My script is below, I can't remember how to make this make sense.
#!/bin/bash
input=$1
output=$2
cp $input $output_$(date +%m%d%y)
The goal is to run the script as follows
/path/script.sh /path/file_name /path/archive/
Archived file would then be
/path/archive/file_name_090718
cp
line and echo the values of${input}
and${output}
. Run the script with no/different arguments. What do you see? Add an echo to output${output}_$(date +%m%d%y)
, what do you see? Once you've done that, you'll be in a better position to know whatcp
command to use.