![]() |
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 |
| Error checking a file from previous file size | stuck1 | Shell Programming and Scripting | 2 | 12-06-2007 08:39 AM |
| Checking file size of zip file | skwyer | UNIX for Dummies Questions & Answers | 2 | 10-11-2007 11:51 AM |
| Checking BLOCK Size | shahnazurs | SUN Solaris | 1 | 06-21-2007 03:36 PM |
| checking size of the first line in a log file | kiran1112 | Shell Programming and Scripting | 19 | 03-22-2007 02:46 PM |
| Checking file size | jkuchar747 | UNIX for Dummies Questions & Answers | 2 | 03-02-2005 02:34 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help with checking file size
I need to check the size of a log file. If the size is anything but zero, I need to send an email. I'm using this syntax:
SIZE=0 VAR1=`wc -c $DIRNAME/$FILENAME1 | awk -F" " '{print $1}' ` echo $VAR1 if [ $VAR1 -ne $SIZE ] then do something such as send an email fi I know that the file is indeed blank, but the VAR1 variable has a size = 8192. Any ideas as to what the problem is? Is there a better way to do this? Thanks in advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|