![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Loop through found files | Calypso | Shell Programming and Scripting | 11 | 04-22-2009 04:03 PM |
| for loop not working - syntax error at line 6: `end of file' unexpected | debojyoty | Shell Programming and Scripting | 3 | 04-13-2009 09:31 AM |
| Error 15-the file was not found-update linux10.0 failure | nandhusky | SuSE | 0 | 01-16-2009 10:36 AM |
| find command in while loop - how to get control when no files found? | mavsman | Shell Programming and Scripting | 3 | 04-03-2008 11:44 AM |
| variable not found with loop? | douknownam | Shell Programming and Scripting | 2 | 09-27-2004 10:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
file not found error during loop
Hi,
I have a strange problem and I'm sure its because I'm doing something stupid. When I loop through all of the files in a directory they cannot be found. Any help would be greatly appreciated. Thanks, -E $ touch a.txt $ touch b.txt $ ls a.txt b.txt $ for f in `ls` ; do echo file $f; done file a.txt file b.txt file $ for f in `ls` ; do file $f; done a.txt: ERROR: cannot open `a.txt' (No such file or directory) b.txt: ERROR: cannot open `b.txt' (No such file or directory) : ERROR: cannot open `' (No such file or directory) $ file a.txt a.txt: empty $ |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|