473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Need Help in Writing Unix Shell scripts

Hi all,

I desperately need to learn Unix Shell scripting with in the short span of time. Could anyone of you suggest me the way or what books should I prefer.


Thanks & Regards,
Kishore
Dec 3 '07 #1
4 2939
arne
315 Expert 100+
Hi all,

I desperately need to learn Unix Shell scripting with in the short span of time. Could anyone of you suggest me the way or what books should I prefer.


Thanks & Regards,
Kishore
I liked the Advanced Bash Scripting Guide .

HTH,
arne
Dec 4 '07 #2
Hi all,

I desperately need to learn Unix Shell scripting with in the short span of time. Could anyone of you suggest me the way or what books should I prefer.


Thanks & Regards,
Kishore
-------------------------
Hi Kishor,

In order to have a starting on shell programming, you can try it with following link:

http://gd.tuwien.ac.at/linuxcommand.org/wss0010.html

It will gives you enough confidance for writing your own scripts too.Once you get it on then for details of shell script programming you can try the following link:-
http://www.esscc.uq.edu.au/~ksteube/Bshell/

Hope that gives you some fruitful results,

Regards,
Raj Kumar Arora
Dec 19 '07 #3
nassim
4
Hi all,

I desperately need to learn Unix Shell scripting with in the short span of time. Could anyone of you suggest me the way or what books should I prefer.


Thanks & Regards,
Kishore
don't forget that there are hundreds of shell scripts on your computer now: make search for shell scripts

i can email you a few simple beginner examples that i have done.
Dec 19 '07 #4
nassim
4
don't forget that there are hundreds of shell scripts on your computer now: make search for shell scripts

i can email you a few simple beginner examples that i have done.
here's a bourne script that copies a file:


#!/bin/sh
trap 'echo "script ex3 interrupted"; exit' 2 #user of system kills script

# control number of arguments typed after command
# command is name of shell script file, which has to be executable
# ie chmod +x filename

if [ $# -ne 2 ]
then
echo "two arguments expected"
exit 1
fi

allowcopy=no; from=$1; to=$2

if [ -e $from ] # if file exists
then
if [ -e $to ]
then
answer=notgiven
while [ $answer = notgiven ]
do
echo " " $to " exists. replace? "
read wish # input from keyboard
case $wish in
y|Y)
answer=given
allowcopy=yes
;;
n|N)
answer=given
exit
;;
*)
echo "y or n please"
;;
esac
done
else
#the from file exists, the to file doesn't. copy from to
allowcopy=yes
fi
else
# the 'from' file doesn't exist. nothing to copy.
echo file $from " not found. exiting."
exit 1
fi

if [ $allowcopy=yes ]
then
cp $from $to
fi

a few useful things in this bash. hope it helps
Dec 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dk | last post by:
is there any way to invoke a unix shell script from .net? tia, dk
7
by: kamkwokho | last post by:
Could any answer following questions as many as you can. ii) Write a C shell script convertmin which will read in a number, thought of as representing minutes, and print out the number of...
0
by: s99999999s2003 | last post by:
hi in my environment, besides shell scripts written for sys admin tasks, there are shell scripts that call java programs which in turn will do various processing like connecting to databases and...
14
by: mistral | last post by:
Need compile python code, source is in html and starts with parameters: #!/bin/sh - "exec" "python" "-O" "$0" "$@" I have installed ActivePython for windows.
1
by: sainathr | last post by:
Hi, I would like to run shell scripts with respect to the time mentioned in postgres data base tables. Postgres database should trigger the shell script for the time mentioned in the table. To...
0
by: skyineyes | last post by:
Hi Can anybody provide information on accessing DB2 database through UNIX shell scripts. Any tutorial will ne highly appreciated. Thanks
0
by: skyineyes | last post by:
Hi Can anybody provide information on accessing DB2 database through UNIX shell scripts.Any tutorial will ne highly appreciated. Thanks
2
by: traju | last post by:
Hi Friends, I am new user in unix o/s,i have a small ques what is the difference b/w unix shell scripts and korn shell scripts
0
by: xahlee | last post by:
Here's a little tutorial that lets you write emacs commands for processing the current text selection in emacs in your favorite lang. Elisp Wrapper For Perl Scripts...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.