file_list='find /home/attrib/ -name *.csv'
for fn in $file_list
do
echo "Inside the loop"
echo $fn
done

I need the list files available in the specified directory
find /home/attrib/ -name *.csv - This works on the command line and gives the desired output .
But the above script Gives me output sme thing like

find
/home/attrib/
-name
*.csv

Am completely new to shell scripting ...Please help me

Check which quote you are using. On the keyboard it should be the one that slants from the upper left to the lower right, not the other way around and not straight up and down. In the code, it should also appear to slant in that direction and not appear in one of the other two ways.

Thanks for the reply ..But am not getting wat u r trying to tell . There is only one single quote available right " ' " . Can u explain it a lill more pls

Hey Thanks for the reply ...Tht worked

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.