•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 456,428 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,572 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 1098 | Replies: 3 | Solved
![]() |
•
•
Join Date: Aug 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
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
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.
Last edited by masijade : Aug 21st, 2007 at 6:37 am. Reason: edit: sorry got the corners wrong.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Using the 'mv' command with paremeters in a script (Shell Scripting)
- Shell Script for Load monitoring! (Shell Scripting)
- Virus Of Death - Help Needed! (Viruses, Spyware and other Nasties)
- usage of the MAIL command in shell scripts (Shell Scripting)
- Mail command in shell scripts (Shell Scripting)
- help me--find command-shell program in unix (Shell Scripting)
- Reading in a .dat file from SSH shell command line (Java)
- This Should be Easy for You Guys! (Linux Servers and Apache)
- I've got Trojan.Holax... is this bad? (Viruses, Spyware and other Nasties)
- not-a-virusadware (Viruses, Spyware and other Nasties)
Other Threads in the Shell Scripting Forum
- Previous Thread: determining instances
- Next Thread: Problem with interpretation of the command line arguments in the script



Linear Mode