Sponsored Content
Full Discussion: Terminal vs. Applescript
Top Forums Shell Programming and Scripting Terminal vs. Applescript Post 302356131 by peterro on Thursday 24th of September 2009 03:07:00 PM
Old 09-24-2009
I don't have much experience with applescript but it looks like you might need to escape the single quotes and possibly the pipe. Why are there ampersands in the middle of the command? Does it need to be split up that way?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

BASH or applescript keygen

Please help me to make this script to create a key based on these parameters: the output of $USER is smithm for mike smith the output of id smithm is uid=1042(smithm) gid=20(staff) groups=20(staff), 1025(group1), 1057(group2), 1028(group5), 1038(group3), 1037(group4) I need a script that... (0 Replies)
Discussion started by: glev2005
0 Replies

2. OS X (Apple)

AppleScript to Bash

Any ideas on converting an applescript into bash? Simple method to get rid of delimiters? (9 Replies)
Discussion started by: unimachead
9 Replies

3. Shell Programming and Scripting

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In... (3 Replies)
Discussion started by: JFraser1
3 Replies

4. OS X (Apple)

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In the... (2 Replies)
Discussion started by: JFraser1
2 Replies

5. Shell Programming and Scripting

Scripting in AppleScript

What I want my script to do is to run a command in Terminal and close that same Terminal window when the process is complete. Of course I could ad a delay of 6 seconds to complete the process, but it may not be enough every time. To simplify my question, this is what I want to achieve.... (0 Replies)
Discussion started by: ShadowofLight
0 Replies

6. OS X (Apple)

[Solved] Running shell code in AppleScript without Terminal

What I want my script to do is to run a command in Terminal and close that same Terminal window when the process is complete. Of course I could ad a delay of 6 seconds to complete the process, but it may not be enough every time. To simplify my question, this is what I want to achieve.... (9 Replies)
Discussion started by: ShadowofLight
9 Replies

7. Shell Programming and Scripting

applescript & grep - sed command

I'm new using Unix commands in applescript. The following script you choose different folders with PDfs, get file count of PDfs on chosen folders, & write the results in text file. set target_folder to choose folder with prompt "Choose target folders containing only PDFs to count files" with... (0 Replies)
Discussion started by: nellbern
0 Replies

8. Shell Programming and Scripting

SED command works in terminal, but not Applescript

The following command works perfectly in Terminal, but not in Applescript. (Returns "unknown token" error for square brackets.) (new to site. sorry.) I have an Applescript that is designed to find and remove any square-bracketed text, including the square brackets. I ran the following code from... (1 Reply)
Discussion started by: Phillip Acosta
1 Replies

9. OS X (Apple)

Applescript application call problem...

Hi all... I am trying to create a shell project purely for this Macbook Pro. I do NOT want to use SOX as the sampling _source_ but Quicktime instead, the idea being that NO third party installs will be needed. The code below works fine except the commented out Applescript line does not do... (2 Replies)
Discussion started by: wisecracker
2 Replies

10. Post Here to Contact Site Administrators and Moderators

Delete or move post to applescript area

i posted an applescript question in the wrong area, trying frantically to delete or move before I get in trouble for posting question in wrong area. it is the one about opening webpages and searching text with applescript, thanks (1 Reply)
Discussion started by: ilovedoritos
1 Replies
escape(1)							Mail Avenger 0.8.3							 escape(1)

NAME
escape - escape shell special characters in a string SYNOPSIS
escape string DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result. EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string: $ var='; echo gotcha!' $ eval echo hi $var hi gotcha! $ Using escape, one can avoid executing the contents of $var: $ eval echo hi `escape "$var"` hi ; echo gotcha! $ A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient: #!/bin/sh formail -x to -x cc -x resent-to -x resent-cc | fgrep "$1" > /dev/null && exit 0 echo "<$1>.. address does not accept blind carbon copies" exit 100 To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt script: bodytest reject_bcc `escape "$RECIPIENT"` SEE ALSO
avenger(1), The Mail Avenger home page: <http://www.mailavenger.org/>. BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells. AUTHOR
David Mazieres Mail Avenger 0.8.3 2012-04-05 escape(1)
All times are GMT -4. The time now is 08:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy