Re: Using 'echo' from 'do shell script'
Re: Using 'echo' from 'do shell script'
- Subject: Re: Using 'echo' from 'do shell script'
- From: Matthew Stuckwisch <email@hidden>
- Date: Sat, 18 May 2002 11:12:00 -0500
OS X 10.1.4, AppleScript version 1.8.2 reported.
set joe to "joe" & return & "joe" & return
do shell script "echo " & joe & " >~/Desktop/joe.txt"
I'm ending up with a linefeed character at the end of the output file (as
opened in BBEdit Lite) unless I use the '-n' arg to 'echo'. Is there
something wrong with the way I'm formating the input to 'do shell script'
?
The -n argument removes any trailing new lines. The string you are
echoing is what is between the hypens:
----
joe
joe
----
If you set joe to "joe" & return & "joe", then you won't need the extra -n
flag.
Matthew Stuckwisch
[AIM/MSN]{GuifaSwimmer} | [Yahoo!]{SapphireTree} | [ICQ]{137477701}
[IRC]{guifa / G}(esperNET / irc.massinova.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.