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

Re: Help Needed using File command in Shell scripts 80 80

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.

Re: Help Needed using File command in Shell scripts 80 80

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

Re: Help Needed using File command in Shell scripts 80 80

Hey Thanks for the reply ...Tht worked

Be a part of the DaniWeb community

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