![]() |
|
|
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 |
| How to check if a file exists using the if statement | Jazmania | Shell Programming and Scripting | 3 | 09-19-2008 01:32 PM |
| check if remote file exists | hcclnoodles | Shell Programming and Scripting | 2 | 08-27-2008 06:53 PM |
| Check if a file exists with certain prefix | raoscb | Shell Programming and Scripting | 11 | 08-20-2008 09:13 AM |
| check if exists a .ZIP file and unzip it using ftp | DebianJ | Shell Programming and Scripting | 1 | 05-05-2005 05:46 PM |
| perl ftp check file exists | methos | Shell Programming and Scripting | 2 | 06-18-2003 09:21 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Check file exists from a shellscript
Hi, I have a list of files that I want to check to see if they exist and then count how many of these files exist, I also want to do the same for the files that arent found. I have done this by creating temp files see below but want ot do this using variables instead: Code:
for FILE in $FILELIST do ls -l $OKAYDIR/$FILE >>countload.txt 2>/dev/null done LOADCOUNT=`cat countload.txt|wc -l` cat countload.txt >>results.txt echo >>results.txt echo "$LOADCOUNT files loaded">>results.txt Thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|