• 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: put sed script in Applescript - Solved!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell: put sed script in Applescript - Solved!


  • Subject: Re: Shell: put sed script in Applescript - Solved!
  • From: Gnarlodious <email@hidden>
  • Date: Tue, 17 Feb 2004 00:33:34 -0700

Entity Gnarlodious spoke thus:

/ A>$/{
$!N;/\n<\/ul>$/{
$!N;s/ A>\(\n<\/ul>\n<li\)/ a><p>\1/;
};
}

The trick (simply) is that all closing "curly braces" must be preceded by a
semicolon ending the preceding line:

do shell script "sed -e '/ A>$/{$!N;/\\n<\\/ul>$/{$!N;s/
A>\\(\\n<\\/ul>\\n<li\\)/ a><p>\\1/;};}'

The actual string sent to the shell can be shown in the output window. This
string exactly matches the script in the external command file.

Thanks to some great guys at comp.unix.shell for explaining it.

-- Gnarlie
getting to love UNIX
_______________________________________________
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: put sed script in Applescript - Solved!
      • From: Laine Lee <email@hidden>
References: 
 >Shell: put sed script in Applescript (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: current date - 1 day?
  • Next by Date: Re: current date - 1 day?
  • Previous by thread: Shell: put sed script in Applescript
  • Next by thread: Re: Shell: put sed script in Applescript - Solved!
  • Index(es):
    • Date
    • Thread