Re: Convert Terminal commands to Apple Script
Re: Convert Terminal commands to Apple Script
- Subject: Re: Convert Terminal commands to Apple Script
- From: Deivy Petrescu <email@hidden>
- Date: Tue, 07 Dec 2010 19:57:09 -0500
On Dec 7, 2010, at 14:00 , Jeffrey Madson wrote:
> I want to create an AppleScript that will issue a Terminal command to a specific folder in the Applications folder. I can do it in Terminal by doing a: cd Applications/hp/ca/agent and then by inserting this command and hitting return: ./Radskman "CAT=PROMPT,ULOGON=N,CONTEXT=M,HREBOOT=Y,ASK=Y,MNAME=RADIA,DNAME=SOFTWARE,IP=RRWIN-CAET01,UID='&(ZCONFIG.DNSHOSTN)',STARTDIR=SYSTEM,LOG=CONNECT_MACHINE.LOG,LOGSIZE=2048000,COP=Y,MNT=Y"
<script>
set TheFolder to quoted form of "Applications/hp/ca/agent"
set TheCommand to "./Radskman \"CAT=PROMPT,ULOGON=N,CONTEXT=M,HREBOOT=Y,ASK=Y,MNAME=RADIA,DNAME=SOFTWARE,IP=RRWIN-CAET01,UID='&(ZCONFIG.DNSHOSTN)',STARTDIR=SYSTEM,LOG=CONNECT_MACHINE.LOG,LOGSIZE=2048000,COP=Y,MNT=Y\""
do shell script "cd " & TheFolder & "; " & TheCommand
</script>
NOTE: TheCommand is one single line
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden