|
|
Another way to create Finder-clickable shell scripts
The key point is that the path must be absolute. /Users/username/Desktop instead of Desktop and so on.
So if you're going to do a lot of things in a specific diretory instead of having:
You can do it like this:
Remember to include
in the top of the shell script to tell that it should be executed by Bash. I'm not sure other shells support the export command.
Another way to create Finder-clickable shell scripts
Oh yeah... if you want to use the script in my example, I would recommend:
this script creates a tar-gzipped file with the date as the name in the home directory of the user username. It appends the list of files to the file /var/logs/savedfiles.txt and removes the files from the original directory
Another way to create Finder-clickable shell scripts
of course you can use cd in a shell script, its just easier to mess up that way... it is a shell after all! :-D |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.12 seconds |
|