Hi
I'm in trouble, I want to get the output of [cmd=]ipfw show[/cmd] and write it to a plain file, I'm trying it with this:
The strange thing is that if I run it manually ($ sh script) it works, but if I cron the script each minute my file just receives a blank line without the number that I need.
I'm in trouble, I want to get the output of [cmd=]ipfw show[/cmd] and write it to a plain file, I'm trying it with this:
Code:
#!/bin/sh
VAR=`ipfw show|grep count|grep in|awk '{print $3}'`
echo $VAR >> file
The strange thing is that if I run it manually ($ sh script) it works, but if I cron the script each minute my file just receives a blank line without the number that I need.