Explore BrainMass
Share

Explore BrainMass

    Shell Programming Input Commands

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    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!

    © BrainMass Inc. brainmass.com October 9, 2019, 8:52 pm ad1c9bdddf
    https://brainmass.com/computer-science/programming-language-theory/shell-programming-input-commands-165061

    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