473,396 Members | 2,021 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,396 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 2940
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.