Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 ./ -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?


  2. #2
    You can make it as a simple script in bash:
    put all the commands here
    You will then need to make the script executable and that's it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts