[prog] bash script - mac address compare and send email

Far Jump far.jmp at gmail.com
Tue Mar 24 04:56:01 UTC 2009


First, you should follow the advice given and not run this command as root

su - some_safe_user -c "your command here"

su will allow you to quickly login as another user run a command and then exit.  then use sed to extract what you need

Jan
______________________________________________________________________
 Keep away from those who try to belittle your ambitions. Small people always do that, but the really great make you believe that you too can become great.
   -- Mark Twain

---------------------- Reply to Message Below ----------------------
On Tue, Mar 24, 2009 at 2:28 PM, Far Jump <far.jmp at gmail.com> wrote:
> Chris,
>
> the problem is not in -eq ... we know this works. 
Your MAC1 is straight forward, so tshark must be return something unexpected or additional ...

yes, the first two lines of tshark is

"Running as user "root" and group "root". This could be dangerous."
"Capturing on eth0"

is this the cause? if yes, how do I get rid of them using sh/awk or sed?

Thanks.



More information about the Programming mailing list