I'm trying to save the output of the script I wanna run but for some reason I cant manage to do it with "script.sh > Output_4.txt"
The thing is that the script was already run and it extracted some directories so when I try to run it again (to save the log to a Output_4.txt) bash says (see screen-capture) and of course the log's empty!!!!
Thx in adavanced!!!!!
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to simulate script execution?
How to simulate script execution?
Code: Select all
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux
At least for now...
- kiyop
- Posts: 3983
- Joined: 2011-05-05 15:16
- Location: Where persons without desire to improve themselves fear to tread, in Japan
- Been thanked: 3 times
Re: How to simulate script execution?
Post the concrete contents of the script.
I think that you should add some command to check if the output file exist or not. You can use parameter to the script instead of redirection.
But I cannot explain it in English well.
If you post the contents of the script, I can write better one.
I think that you should add some command to check if the output file exist or not. You can use parameter to the script instead of redirection.
But I cannot explain it in English well.
If you post the contents of the script, I can write better one.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
http://kiyoandkei.bbs.fc2.com/
-
- df -h | grep > 20TiB
- Posts: 1418
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 79 times
- Been thanked: 189 times
Re: How to simulate script execution?
My solution would be to use a "logger" type function within the script, with a switch for "debug mode" that logs to a file. But it really depends on what you are trying to do.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.