Difference between revisions of "Ubuntu Bash scripts"

From Lofaro Lab Wiki
Jump to: navigation, search
(Created page with "File:Bash.png Above is a simple bash script for some files all you need to do is cd to the location of the files the gnome-terminal opens a new command terminal and you t...")
 
 
Line 1: Line 1:
 
[[File:Bash.png]]
 
[[File:Bash.png]]
  
Above is a simple bash script for some files all you need to do is cd to the location of the files the gnome-terminal opens a new command terminal and you tell it to run what ever program in that terminal. You must have the #!/bin/sh at the top for it to work.
+
Above is a simple bash script for some files all you need to do is cd to the location of the files the gnome-terminal opens a new command terminal and you tell it to run what ever program in that terminal.  
 +
 
 +
You must have the #!/bin/sh at the top for it to work.
 +
 
 
The bash script must be saved as anything.sh
 
The bash script must be saved as anything.sh
 +
 
To run the script you cd to the location of the bash script and then type bash anything.sh
 
To run the script you cd to the location of the bash script and then type bash anything.sh

Latest revision as of 14:30, 3 December 2014

Bash.png

Above is a simple bash script for some files all you need to do is cd to the location of the files the gnome-terminal opens a new command terminal and you tell it to run what ever program in that terminal.

You must have the #!/bin/sh at the top for it to work.

The bash script must be saved as anything.sh

To run the script you cd to the location of the bash script and then type bash anything.sh