Difference between revisions of "Shell scripting tutorial"

From Linuxintro
imported>ThorstenStaerk
Line 1: Line 1:
 +
= 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
 +
 
= See also =
 
= See also =
 
* [[bash]]
 
* [[bash]]

Revision as of 23:45, 1 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

See also