Results 1 to 2 of 2
Hello Guys,
I never scripted in linux but want to write a script to do the following.
1. mount /dev/cdrom to mnt and untar a tarball to /root
2. remove ...
- 09-23-2011 #1Linux Newbie
- Join Date
- Jul 2006
- Posts
- 106
Simple script to do some tasks
Hello Guys,
I never scripted in linux but want to write a script to do the following.
1. mount /dev/cdrom to mnt and untar a tarball to /root
2. remove a rpm package with nodeps option
3. go to /root/tardirectory and do a ./install.pl -default
4. remove the tardirectory
now i do these manually but to automate this into a script, how do i do that? write a shell script? or in perl?
please advice, this is for a rhel machine, but rarely we also load ubuntu machines so may be perl might be a good option to write the script?
Thanks
RJ
- 09-24-2011 #2Just Joined!
- Join Date
- Sep 2011
- Posts
- 52
You can make it as a simple script in bash:
You will then need to make the script executable and that's itCode:#!/bin/bash put all the commands here


Reply With Quote