bash - How can I write a shell-script that will email me a file if the file is not empty? -


I'm looking at a script that I can see if a text file is empty or not, if it's nothing then If there is something in it, then I have to send an email with a text file as this message. Do not know how to do it.

  [-s "$ f"] & amp; Amp; ; Mail me@example.com -s "$ f Content" & lt; $ F  

Good and Compact :)


Comments

Popular posts from this blog

email - PHP mail error ... failed to open stream : permission denied -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c - Different access levels with PAM -