LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 2224 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 07:37 PM.

Main Menu
Advertisement
Advertisement
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
Open Source Consulting | Domain Registration