Share
Explore BrainMass

Shell Programming

Write a shell program which:

- Get input from command line file1 & file2
- Copy file1 to file2

- Check if there is exactly 2 filenames, if not, printout error message
- Check if file1 is the same as file2, if yes, printout error message

Thanks!

Solution Preview

#!/bin/bash

#Write a shell program which:

#-Get input from command line file1 & file2
#-Copy file1 to file2

#-Check if there is exactly 2 filenames, if not, printout error message
#-Check if file1 is the same as file2, if yes, printout ...

Solution Summary

A shell program that checks filename equality.

$2.19