10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a peculiar issue w.r.t redirecting the command output to a file when using loop.
I am redirecting command output to same file in a series of if condition statements, but if one block of if condition statement writes the log to the file , the subsequent block of if condition... (7 Replies)
Discussion started by: ananan
7 Replies
2. Shell Programming and Scripting
I'm having a strange problem with basic >& output redirection to a simple log file in csh. When I run this particular output redirection on the command line, it works, but then when I run the same output redirection command >& in my c shell script, I get a blank log file. Nothing is output to the... (5 Replies)
Discussion started by: silencio
5 Replies
3. Shell Programming and Scripting
I have a simple script which will send a curl request and redirect the output to a log file.
for i in {1..20}
do
curl google.com -is >>log.log &
echo "request # $i" >> log.log
doneAfter it completes the execution, if I run the following command I should see 20 lines because I am printing... (4 Replies)
Discussion started by: heykiran
4 Replies
4. Shell Programming and Scripting
I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies
5. Shell Programming and Scripting
OS : AIX 6.1
Shell : Korn
in the url
https://forums.oracle.com/forums/thread.jspa?threadID=361463&tstart=0
I came across a crontab entry example
00 23 * * 1,3,5 <complete shell script path> 1> <log file> 2>&1
From googling , I gathered that
0 - stdin
1 - stdout
2 - stderr
I... (5 Replies)
Discussion started by: polavan
5 Replies
6. UNIX and Linux Applications
Dear All,
./waf --run scratch/myfirst > log.out 2>&1
The above is a command line to redirect the output to a file called log.out.
what is the 2>&1 part for ?
Thank you (2 Replies)
Discussion started by: knowledgeSeeker
2 Replies
7. Shell Programming and Scripting
Hello everyone,
My requirement is that within a script I need to construct the command line exactly that it was invoked with. For example :
sh a.sh arg1 arg2 arg3 < input.txt > output.txt
Now within a.sh, I construct a file which has these contents "
sh a.sh arg1 arg2 arg3 < input.txt >... (8 Replies)
Discussion started by: hedonist12
8 Replies
8. Shell Programming and Scripting
I am using tar command to append daily database backups on tape. "tar --append " command help me to do this.
But tar --append command does not produce any output on stdout if it succeed.
I want the output for that appended command to a log file.
This log file should contain only the name of the... (0 Replies)
Discussion started by: pganguly46
0 Replies
9. Shell Programming and Scripting
Hi Guys,
I have a script for which the stdout and stderr should be redirected to a log file, they should not be printed on the screen. Could you please let me know the procedure to redirect the output of the script to a log file. Thanks in advance.
--- Aditya (5 Replies)
Discussion started by: chaditya
5 Replies
10. Shell Programming and Scripting
Hi,
Can anyone please tell me what these lines do?
ls >& outfile
ls outfile 2>&1
Thanks. (1 Reply)
Discussion started by: trivektor
1 Replies