Apr 6, 2004 #1 ogniemi Technical User Nov 7, 2003 1,041 PL what is the simplest way to check/test file size? (not using ls, istat, cksum - commands) I need the shortest way to use it the script... [ `....` -gt 724387 ] && ..... regards, m.
what is the simplest way to check/test file size? (not using ls, istat, cksum - commands) I need the shortest way to use it the script... [ `....` -gt 724387 ] && ..... regards, m.
Apr 6, 2004 #2 PHV MIS Nov 8, 2002 53,708 FR Try something like this [ `wc -c $file` -gt 724387 ] && ..... Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Try something like this [ `wc -c $file` -gt 724387 ] && ..... Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
Apr 6, 2004 #3 aigles Technical User Sep 20, 2001 464 FR wc also displays the file name which must be removed [tt] [ `wc -c $file|awk '{print $1}'` -gt 724387 ] & .... [/tt] Jean Pierre. Upvote 0 Downvote
wc also displays the file name which must be removed [tt] [ `wc -c $file|awk '{print $1}'` -gt 724387 ] & .... [/tt] Jean Pierre.
Apr 6, 2004 Thread starter #4 ogniemi Technical User Nov 7, 2003 1,041 PL Alas, it will not work. At least "cut" or "awk" have to be used... # wc -c smit.log 2134511 smit.log [ `wc -c smit.log|awk '{print $1}'` -gt 724387 ] && ..... do you know something shorter...? thx. Upvote 0 Downvote
Alas, it will not work. At least "cut" or "awk" have to be used... # wc -c smit.log 2134511 smit.log [ `wc -c smit.log|awk '{print $1}'` -gt 724387 ] && ..... do you know something shorter...? thx.
Apr 6, 2004 #5 PHV MIS Nov 8, 2002 53,708 FR Try something like this [ `wc -c [highlight]<[/highlight]$file` -gt 724387 ] && ..... Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Try something like this [ `wc -c [highlight]<[/highlight]$file` -gt 724387 ] && ..... Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884