Tag Info

New answers tagged

0

Thank you for all the help guys. Taking everything into account from the awesome suggestions thanks to Steve, Ian, orkoden and njboot here is the result of the script which works. I wish I knew how to apply the error checking that Ian had suggested so I added the set -eux. #!/bin/sh #sudo chmod +s "scriptname" - will run as root without requiring password ...


1

This should work. I don't have time currently to explain the changes/additions, but I'll update. You must run this script as sudo for it to work. Even easier, sudo chmod +s yourscript - will run as root without requiring password. #!/bin/bash #Machines must have cURL installed as a prerequisite to download software from internet or FTP server #Change ...


5

For cURL it comes back saying command not found You need to solve this first. cURL ships default with OS X 10.9 and should be in your PATH assuming you haven't monkey with your PATH environment variable. Try calling it directly with: /usr/bin/curl in the script instead. Also: which curl in a Terminal will show you the full path to the curl command ...


1

This should work: #!/bin/sh #Machines must have cURL installed as a prerequisite to download software from internet or FTP server # grab files from www.teamviewer.com or custom FTP server cd ~ curl -O http://downloadus3.teamviewer.com/download/TeamViewerHost.dmg # grab TeamViewer from custom FTP server curl -O ...


0

I would first try putting quotes around your URLs for curl and the other commands. Inside the shell script, punctuation can cause issues. Also change the first line to #!/bin/bash instead of sending it to sh.


2

Let's start with a small example. Fire up Automator and create a service with a single "Run Shell Script" step. Set it to take Folders as input from Finder Pass input as arguments. Shell is /bin/bash Bash code: cd "$@" for file in *.mov *.flk *.mp4 do ls -1 "$file" >> ~/Desktop/test_file_awk.txt done What this does it takes the ...


1

It seems the issue isn't with AppleScript, but with Script Editor, after confirming it with a back and forth with an Apple engineer. I'm still not convinced of why this should be the case, but the script runs a lot better when run via osascript, especially after refactoring it to use a whose statement when fetching messages, rather than iterating over them ...


0

I've haven't an OSX up my sleeve but I think the problem is : ^C is not like Ctrl+C. What you are looking for is : keystroke "c" using control down edit: Was too slow :3


1

^C is not a valid keystroke. Use: tell application "System Events" keystroke "c" using control down end tell



Top 50 recent answers are included