i'm still new to this site and thought i might find some help here :).
lately i performed a script to make an automatic backup of some files in certain directories. the script looks something like this:
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
You can check $? which will have the exit code of each former command (maybe your tar and gzip) with an if/fi instruction for example and then decide to send a mail or not. If $? is > 0 then it might have had some troubles.
Thanks for your reply. Forgive my ignorance, i am still very new to UNIX and scripting. Can you show me such example?
thanks.
---------- Post updated at 08:01 AM ---------- Previous update was at 08:00 AM ----------
Thanks ggs i will try that!
---------- Post updated at 08:22 AM ---------- Previous update was at 08:01 AM ----------
Hi ggs, is there a way to cinfigure mailx? the reason is that the files are stored in this machine which i then need to receive an email on a windows machine.