|
Post by ritalin on Mar 26, 2008 7:56:03 GMT
Because shell script is basically list of shell instructions run in sequence, a reasonable knowledge of the shell (Terminal) is need. This is a quick and basic introduction to the shell.It should take about 10 minutes to read through it. It also has links, in html, to man (manual) pages for the shell commands. These are useful for reference. To learn shell script then a good starting point would be here.Again it short and sweet. You need to get through this page and really understand it all. If this is all new to you, then you wont understand everything after one read through. The best thing is to actually build the scripts and play with them. If you haven't already done so install Xcode and launch the Xcode.app and create an new shell script file. I suggest saving it as test1 on your desktop. You can now just copy example shell scripts into Xcode and play around with them. Save the file, launch Terminal and run your new shell script.
|
|
|
Post by nikonnut on Mar 26, 2008 11:37:04 GMT
Fantastic Rit! This is just what I'm looking for. Thanks!
|
|
|
Post by ritalin on Apr 22, 2008 19:38:47 GMT
This is for something I am working on. The bits that say: would obviously be replaced with something more useful.
There is a lot of repeated code, does any one know of a way to cut it back a little?
|
|
|
Post by ritalin on Apr 26, 2008 12:30:59 GMT
Here is a version using "case" instead of the nested "if" statements.
|
|
|
Post by ritalin on Apr 26, 2008 20:42:05 GMT
Another little problem. How to run a process in the background and display a progress bar to indicate something is happening and the script hasn't hung?
So far this is what I've come up with.
|
|
|
Post by ritalin on Jun 10, 2008 20:14:35 GMT
This is for something I am working on. The bits that say: would obviously be replaced with something more useful. There is a lot of repeated code, does any one know of a way to cut it back a little? Well I have cut it back just a little! ;D Here is my new version:
|
|
ohm51
New Member
Posts: 2
|
Post by ohm51 on Jan 29, 2009 17:38:05 GMT
Loved those first pages in their simplicity ... using the gif images to graphically delineate the path to the utilities folder to open Terminal. I will admit the second page was quite perplexing as yet ... but you have convinced me that the sky will NOT Fall if I simply open a terminal window (and exercise reasonable caution) taking it stepwise as I go (one must learn to step before running) ... been looking for something along these lines. So Thanks for That. This does lead me to ask a few questions though as I am trying to understand the scheme of how things work in Unix / Mac OS X. 1. When booting into Open Firmware in verbose mode is this all occuring within the 'shell' ?? 2. When working in Xcode are the commands 'sandboxed' ... in a 'test mode' or are you actually invoking the commands at the root directory ?? 3. The relationship between Applescript and the 'shell' environment ?? (a) Does learning one enhance ones understanding of the other ... ( or) Is Applescript strictly for pikers Feel free to answer via the board or mail ... whichever you choose ... if you are inclined to be so kind ... and absolutely No Hurry in answering btw ... I've been sitting on these thoughts for awhile ... so whenever you might find the time, it will be greatly appreciated and considered quite carefully. Thanks Again and Best Regards Ohm51
|
|