LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > path_finder
User Name
Password

Notices

Rate this Entry

Shell Script writing (URGENT)

Posted 04-14-2010 at 02:04 PM by path_finder

Write a shell script that swaps the contents of two files. The shell script should be called swap.sh.
The swap.sh script should take two arguments as input. They indicate the two files to be swapped. You should check that the proper number of arguments have been passed and that the filenames passed on the command line have the proper permissions set. You should also check that any temporary files used during the execution of the script do not exist. If any of these checks fail, then print an appropriate error message and exit the script with a status of one. If all of the checks pass, then swap the two specified files and print a message indicating that the two files have been swapped.


Thanks in Advance
Posted in Uncategorized
Views 1488 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:08 AM.

Main Menu

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration