Можете ли вы помочь мне отправить электронное письмо, если столбец $ 3 превышает 100, например?
host@root:> report_alias | awk '{ if($3 >= 100) { mailx -s "FILES REPORT" < "FLOW" $1,$2,$3 " has problems" example@host.ro ;}}'
awk: { if($3 >= 100) { mailx -s "FILES REPORT" < "FLOW" $1,$2,$3 " has problems" example@host.ro ;}}
awk: ^ syntax error
awk: { if($3 >= 100) { mailx -s "FILES REPORT" < "FLOW" $1,$2,$3 " has problems" example@host.ro ;}}
awk: ^ syntax error
awk: { if($3 >= 100) { mailx -s "FILES REPORT" < "FLOW" $1,$2,$3 " has problems" example@host.ro ;}}
awk:
Вывод «псевдоним отчета»
Flow REPORT 1 3,450 has problems
Flow REPORT 2 3,154 has problems
Flow REPORT 3 134 has problems
Flow REPORT 4 134 has problems
Flow REPORT 5 has problems
Flow REPORT 6 has problems