cpc.sh (467B)
1 # DEPRECIATED: not sure why this existed (could just cp?) 2 3 #!/bin/sh 4 # cpc (cp contents) 5 # description: copies the contents of file $1 to file $2 6 # 7 # e.g.$ cpc file1.txt file2.txt 8 9 if [ -z $1 ] || [ -z $2 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then 10 echo "Usage: cpc INPUT OUTPUT" 11 echo "" 12 echo "copy the contents of the file INPUT to file OUTPUT" 13 echo "WARNING: this will overwrite existing contents in file OUTPUT" 14 exit 15 fi 16 17 touch $2 18 echo "$(cat $1)" > $2 19