10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. 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
3. Shell Programming and Scripting
I am making a script where i want to redirect the output of ls -l to a file
#ls -l fil1.txt > /opt/temp/a.txt
ac: No such file or directory
I want to capture output of this command
like here output is
ac: No such file or directory
can anyone help (4 Replies)
Discussion started by: anish19
4. Shell Programming and Scripting
So I have a existing file that I used the uniq command on and I need to save the output to the same file without changing the file name.
I have tried $ uniq filename > filename
then when I cat the file it then becomes blank like there is nothing inside.
any help would be much appreciated... (0 Replies)
Discussion started by: drew211
5. Shell Programming and Scripting
I have a system stat command running which generates data after 5 sec or so. I pass this data to awk and do some calculation to present the data differently. Once done now I want to pass this data to file as and when generated but doesn't work..unless the first command completes successfully.... (6 Replies)
Discussion started by: learnscript
6. UNIX for Dummies Questions & Answers
Suppose I have a file named a
When I write
The following error message is displayed
cat: a: input file is output file
and my file a is truncated to zero size.
Also the exit status of the last command is 1
Can someone tell me what actually happens when I do so? (1 Reply)
Discussion started by: aagajaba
7. Shell Programming and Scripting
I want ssh to the remote server and then execute ls and redirect the output to the file in remote server itself
ssh root@$server `ls /var/log/users.txt > root@$server:/home/users.txt`
Can you please let me know the correct syntax for it.
Thanks in advance (2 Replies)
Discussion started by: mohitmoudgil
8. UNIX for Dummies Questions & Answers
I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file:
And this is the expected... (2 Replies)
Discussion started by: Everton_Silveir
9. UNIX for Dummies Questions & Answers
Apologies for the trivial nature of this question but I cannot seem to get a simple re direct to a log file to work
at -f batch.sh now >> log.txt
I am trying to get the batch.sh contents into the log file
Manny Thanks (8 Replies)
Discussion started by: JohnCrump
10. Shell Programming and Scripting
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Discussion started by: r1500