• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Shell-sandwich a file in 2 variable strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell-sandwich a file in 2 variable strings


  • Subject: Re: Shell-sandwich a file in 2 variable strings
  • From: Chris Janton <email@hidden>
  • Date: Sun, 01 Feb 2004 03:52:44 -0700

On Jan 31, 2004, at 11:00 PM, Gnarlodious <email@hidden> wrote:

The closest I can get is

do shell script "echo " & quoted form of startHTML & " " & htmlFilePOSIX & "
" & quoted form of endHTML & ">" & iPathPOSIX

If the HTML is in files you can simply do

cat file1 file2 file3 > file4

If the HTML is just a single tag you can do

echo "TAG-OPEN" `cat somefile` "TAG-CLOSE" > some-file

which is one less process than "echo", "cat", "echo"

8)
----------------------------------
Chris Janton - face at CentosPrime dot COM
Netminder for Opus1.COM
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Shell-sandwich a file in 2 variable strings
      • From: Christopher Nebel <email@hidden>
    • Re: Shell-wrap a file in 2 variable strings
      • From: Gnarlodious <email@hidden>
    • Re: Shell-sandwich a file in 2 variable strings
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Burning a CD
  • Next by Date: Re: How to press a button in a Finder window
  • Previous by thread: Re: Burning a CD
  • Next by thread: Re: Shell-sandwich a file in 2 variable strings
  • Index(es):
    • Date
    • Thread