I have created a shell script which reads from csv File A (INPUT.csv) and then creates interim file from the data, do some operations and create another csv File B. Later at the end it merges the two files INPUT.csv and B together to generate FinalOutput.csv.
Limitation of the script is if the file name is different then I have to either rename the file or make the change in the script else it will not read. How can I make this dynamic so that whatever the name of the file is -- it should process and create the FinalOutput.csv
Sample script -
#!/bin/bash
awk -F, '{print $2}' INPUT.csv > FileB.csv
{
Operations on File B
}
paste -d "," INPUT.csv FileB.csv > FinalOutput.csv
exit 0