10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've got a problem with file redirection in bash, in loop while (in my script done < bufor.txt). In every consecutive iteration there's a possibility that to the bufor.txt will be added some lines. Unfortunately, in loop, added lines are ignored (for example: bufor.txt has 5 lines, in 3rd iteration... (4 Replies)
Discussion started by: kk9
4 Replies
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
2 Replies
3. Solaris
Hello,
I need an input from you all.
I want to redirect the output of 'ls' command to a file
but the file should not display the output file name in it.
scenario:
------------
$pwd
/home/user1
$ls
file1 file2
$ls > file3
$cat file3
file1 file2 file3
In this i dont wish... (6 Replies)
Discussion started by: aravindan
6 Replies
4. UNIX for Advanced & Expert Users
i have many questions concerning the FD.
it was stated that "to redirect Error to output std, you have to write the following code"
# ls -alt FileNotThere File > logfile 2>&1
# cat logfile
ls: cannot access FileNotThere: No such file or directory
-rw-r--r-- 1 root root 0 2010-02-26... (9 Replies)
Discussion started by: ahmad.zuhd
9 Replies
5. UNIX for Dummies Questions & Answers
Suppose I have a file named a
When I write
cat a>a
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
1 Replies
6. Shell Programming and Scripting
Hi all,
I am working with the Grinder tool (unrelated to my question) to redirect the output of a program to a file as follows:
java -cp $CLASSPATH net.grinder.TCPProxy > grinder.txt
This is a proxy server which pipes output to a file. When I do something on my proxy, more and more goes to... (1 Reply)
Discussion started by: Annorax
1 Replies
7. Shell Programming and Scripting
Hi,
I have a fbackup step as below
/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full
Now the errors that i will get in case of the fbackup step, I want to redirect them to a file. Please help me how to redirect to a file.
Thanks,
Avik. (5 Replies)
Discussion started by: avik.nandi
5 Replies
8. Shell Programming and Scripting
my querry is
suppose i have duplicate std i/p with FD-3 --exec 0<&3
now redirected std i/p to a file ----exec 0<file1
suppose i am reading the file line by line --while read LINE
cutting some fields and comparing it with a variable and if a match is found
... (0 Replies)
Discussion started by: mobydick
0 Replies
9. Shell Programming and Scripting
Hello All,
I was wondering is there any other way in Shell Scripting to redirect the errors to a output file inside a shell script with using a error status checking or a command line redirection.
Say without doing this
ksh test.ksh 2> error.txt
or without doing this ...
if ; then... (3 Replies)
Discussion started by: maxmave
3 Replies
10. Shell Programming and Scripting
Hi,
i use awk -F to print three variable delimited by comma $1 $2 $3
if $2=="" i want to extract this information missing from another file using awk -v + some process.
but the problem i can't use the two awk together cause of redirection
there's a solution.
note: i can't use another... (1 Reply)
Discussion started by: kamel.seg
1 Replies