Re: String manip: from AppleScript to shell
Re: String manip: from AppleScript to shell
- Subject: Re: String manip: from AppleScript to shell
- From: Philippe GRUCHET <email@hidden>
- Date: Wed, 29 Jan 2003 00:45:57 +0100
I wrote:
Before going farther with shell commands, I'd like to know if a such
AppleScript routine can be translated in Perl for a 'do shell script'
command:
-- string manipulation: swaps two words (here, space separated)
set {aString, text item delimiters} to {"Apple Script", space}
aString's text item 2 & space & aString's text item 1 --> "Script
Apple"
-- eos
From: Ivan Andrus <email@hidden>
-- string manipulation: swaps two words (here, space separated)
set aString to "Apple Script"
do shell script "perl -e 'print(join \" \", reverse split /\\s+/, \"" &
aString & "\");'"
--> "Script Apple"
-- eos
Many thanks to Ivan!
Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.