Difference between revisions of "Shell scripting tutorial"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 23: Line 23:
 
* [[bash Operators]]
 
* [[bash Operators]]
 
* http://en.wikibooks.org/wiki/Bash_Shell_Scripting
 
* http://en.wikibooks.org/wiki/Bash_Shell_Scripting
 +
* http://wiki.linuxquestions.org/wiki/Bash_tips
 +
* http://wiki.linuxquestions.org/wiki/Bash

Revision as of 00:07, 2 January 2012

Hello world

echo "hello world"
#!/bin/bash
echo "hello world"

input

echo "what is your name? "
read name
echo "hello $name"

Note that the variable is called $name, however the correct statement to read it is

read name

conditions

echo "what is your name? "
read name
if [ $name = "Thorsten" ]; then echo "I know you"

See also