Hi,
My Requirement is to read the filenames which possess space charatcer in it and pass the same file name to the other shell script as input parameter.
Please provide your valuable suggestion.
One way is to enclose the filenames in quotes.
Hi,
This is wat i am doing in the code
For file_name in *\ *
do
test.sh file_name
done
files in the folder
test 1.csv
test 2.csv
test3.csv
please provide a suggestion
Please use code tags
for file_name in *\ *
do
test.sh "$file_name"
done
Hi,
I can read the file names properly.However while passing the file names as a parameter it is not taking the complete name.
I tried with above solution and its not working
Frans also introduced double quotes around the variable reference. You need those to preserve the space in the file name.