I am running my bash script with a file as the input file:
./myscript.sh anyfilename.txt
and then here is the script:
#!/bin/bash
input_file=$1
dest_dir="./destination"
mkdir -p "$dest_dir"
cp "$input_file" "$dest_dir"
when I run it, it copies the file to the destination directory using the same name as it is passed to the bash parameter, anyfilename.txt.
Question:
how can I copy the input file into the destination directory by renaming it always as myfile.txt?