Afficher un message
Vieux 05/11/2006, 18h41   #2
koneruarjun@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: execute command inside awk

one of the simplest ways:
VAR=`your awk command shown below `
parse ${VAR} as needed
---Arjun
relikwie wrote:
> Hi, below a code snippet that checks filesize and reports on this.
>
> ls -Ll /${FILE} | awk '{ if($5 < 1610612736)
> print $9,"Less than 1.5 Gbytes",$5 ;
> else print $9,"GREATER than 1.5 Gbytes - ",$5 }'
> } > result.txt
>
> How can I log the output and set a parameter if size > 1.5Gb, so I can
> take further action in the script.
> Mail a warning.
>
> I've been playing around, but just can grasp awk.
>
> ty.


  Réponse avec citation
 
Page generated in 0,04577 seconds with 9 queries