Re: do shell script - quotation marks problem
Re: do shell script - quotation marks problem
- Subject: Re: do shell script - quotation marks problem
- From: Christopher Nebel <email@hidden>
- Date: Sat, 18 Dec 2004 22:10:24 -0800
On Dec 18, 2004, at 10:57 AM, Martin Orpen wrote:
on 18/12/04 5:43 pm, Armin Egginger wrote:
only for example:
do shell script " grep Volumename | cut -d " " -fl"
Why are you using quote marks with cut?
If you want to use a space as a delimiter you'd do something like:
$ echo 'hello world' | cut -d\ -f1
hello
You don't have to use quotes, but it's not particularly abnormal. A
helpful trick sometimes is to exploit the fact that sh understands both
single and double quotes (though they have somewhat different meanings
-- read the sh(1) man page for details), so you could also say this:
do shell script "echo 'hello world' | cut -d ' ' -f1"
No backslashing necessary.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden