Home » Infrastructure » Linux » Help shell script beginner
icon4.gif  Help shell script beginner [message #129755] Tue, 26 July 2005 09:41 Go to next message
linux
Messages: 1
Registered: July 2005
Junior Member
How to...

1. backup 2 important files "/etc/passwd", "etc/shadow" into a directory "/backup"

2.save the partitions info of hard disk /dev/hda into a file "/backup/partitions.txt"

3. if the above command succeed (return zero value), append the partitions info of hard disk /dev/hdb into the same file in step 2.

4. test the network card is working or not. Issue the command "ifconfig eth0" and "grep" the line with keyword "UP". Save that single line into the file "/backup/eth0.txt"

5. save the sentence "the installation process completed at current date and time" into the file "/backup/log.txt". (current date and time should be generated on the fly with the command "date")
Re: Help shell script beginner [message #129971 is a reply to message #129755] Wed, 27 July 2005 08:57 Go to previous message
oralover
Messages: 97
Registered: January 2005
Member
i think you have to go the sites below to learn and see some examples of Unix/Linux Shell Scripts, dont be lazy.

http://heather.cs.ucdavis.edu/~matloff/UnixAndC/Unix/CShellII.html

http://www.injunea.demon.co.uk/pages/page201.htm

http://www.intuitive.com/wicked/wicked-cool-shell-script-library.shtml



and try GOOGLE to search for shell+script+unix+linux etc.
remember Google is a best friend on net.



Previous Topic: Install Dev Suite 10g on Fedora Core 4 / SuSE 9.x
Next Topic: FRM-91111: Internal Error: window system startup failure
Goto Forum:
  


Current Time: Thu Dec 02 00:56:51 CST 2021