Writing a Shell Scripting in Ubuntu
Go to
1.Applications->System Tools-> Root Terminal
2.Create a file for editing say “a1.txt”
3.Open it and save it as a1.sh or just a1
Then type these lines
#! /bin/sh
# This is a comment
#echo "Ramanean"
a=1
b=1
c="$(($a+$b))"
echo “$c”
Every script would being with #! /bin/sh/ and rest of the lines are self explanatory and also one important thing you have to keep in mind is there should not be any spaces between assignment of variables
Here are the Shell scripting resources
http://steve-parker.org/sh/intro.shtml
http://www.hsrl.rutgers.edu/ug/shell_help.html
http://www.freeos.com/guides/lsst/ch01sec06.html
http://lowfatlinux.com/linux-script-variables.html
http://tldp.org/LDP/abs/html/
This entry was posted on Tuesday, December 23rd, 2008 at 1:07 am and is filed under Shell Scripting. You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.