0

I have a sample file in the below format

Name Description Value
ram ABC 0
sri DEF 0
arjun DEF 5

If the 3rd column $3 contains a value other than 0, need to generate an email.

I can pick the contents of column 3 using awk '{print $3}' file_name.

Need someone to help me beyond this.

1
  • 1
    Welcome to Stack Overflow. Please read the FAQ soon. What does the email need to contain? Who should it be sent to? Which mail sending agent are you planning to use? How would you test that the value in $3 is not zero in awk? Commented Jun 26, 2013 at 6:50

1 Answer 1

1
awk '$3!=0{system("mail -s "Subject" [email protected]");}' your_file
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.