Hi i would like to do the following.
./script.sh some.file.name.dat another.file.dat
Filename1=$(echo "$1"|cut -d '.' -f 1,2)
Filename2=$(echo "$2"|cut -d '.' -f 1,2)
tempfile_"$1"=$(mktemp)
tempfile_"$2"=$(mktemp)
I know this code isn't working. I need to create these temporary files and use them in a for loop later, in which i will do something with the input files and save the output in these temporary files for later usage. So basically i would like to create the variable names dependent on the name of my input files.
I googled a lot and didn't found any answers to my problem.
I would like to thank for your suggestions