| | |
How does this look
![]() |
Save the file with a .sh extension, then add executable permissions:
Now run it:
Note that your current directory doesn't have to be where the script is to run it:
Shell Scripting Syntax (Toggle Plain Text)
$ chmod ugo+x shell-script.sh
Shell Scripting Syntax (Toggle Plain Text)
$ ./shell-script.sh
Note that your current directory doesn't have to be where the script is to run it:
Shell Scripting Syntax (Toggle Plain Text)
$ /some/path/shell-script.sh
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
You pretty much have your entire script right there, assuming you don't need to be any more creative, just add a
#!/bin/bash
line to the top and make it executable, etc, per the above post by John A
Best wishes,
Mike
#!/bin/bash
line to the top and make it executable, etc, per the above post by John A
Best wishes,
Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
![]() |
Other Threads in the Shell Scripting Forum
- Previous Thread: Please Help!!!
- Next Thread: Shell Programming
| Thread Tools | Search this Thread |






