Execu Script from itself
by hatfani from LinuxQuestions.org on (#4ZH47)
Hey,
I have a long script with a lot of echo commands that I want that it's output will use as my txt for an email.
The script is "Re.sh"
I want to do something like that:
Code:
echo "this is my mail"
./Re.sh > Me.txt
mail -s Myemail@something.com < /home/Me.txtMy problem is that I cannot execute the script from itself, I wrote another script to execute it and it worked, but do I have to build another script for that?


I have a long script with a lot of echo commands that I want that it's output will use as my txt for an email.
The script is "Re.sh"
I want to do something like that:
Code:
echo "this is my mail"
./Re.sh > Me.txt
mail -s Myemail@something.com < /home/Me.txtMy problem is that I cannot execute the script from itself, I wrote another script to execute it and it worked, but do I have to build another script for that?