Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
9/26/2006 6:55:06 AM EDT
im checking to see if a file has more than 0 bytes and if so FTP it over to the production box. ive got
<snip>
filesize= du -b file_to_process.rst
if [ filesize <= 0 ]; then
ftp (snip)
fi
<snip>

well the problem is the value in $filesize. i want a number to compare to zero. but the du command (and wc ) output for example:
# 123         .file_to_process.rst


anyone know of any command to give me just the number without the file name?
or any other ideas?


ETA: problem solved