I have written a bash script which does the following:
- Ask user to input the path of the directory containing all CSVs.
- Run a C++ script that does takes each CSV and do some processing on it
echo "Enter the path where all the CSVs are stored" read varname
The problem is now when I do $varname
and pass it to my C++ code, it's not getting interpreted as a string. Only the first value is being passed which makes sense but I am unable to figure out how to send the varname as a single string. For example, if I enter path_to_CSVs/*.csv
, then I want to pass this value in this format "path_to_CSVs/*.csv"
to my C++ program.
I am not an expert in bash scripting, so can someone please help?