10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Why does this until false; do history | head -5; done
result in a stdout infinite loop, yet until false; do history | head -5 > hist5; done
only writes it once to file hist5? Furthermore, I can hear the hard drive working on the 2nd command until I end the process, but the history | head -5 is... (1 Reply)
Discussion started by: Xubuntu56
1 Replies
2. Shell Programming and Scripting
I have to redirect STDERR messages both to screen and also capture the same in a file but STDOUT only to the same file.
I have searched in this formum for a solution, but something like
srcipt 3>&1 >&2 2>&3 3>&- | tee errs
doesn't work for me...
Has anyone an idea??? (18 Replies)
Discussion started by: thuranga
18 Replies
3. Shell Programming and Scripting
I have a C program that continously outputs info to stdout. The problem is that I am redirecting the stdout and stderr to a file and stdout is written at the end of the problem rather than continously to the file. This could be a problem if for example the program is killed and the stdout output is... (3 Replies)
Discussion started by: igurov
3 Replies
4. Programming
I originally wrote my script using the korn shell and had to port it to bash on a another server. My script is working find for backing up but noticed that now after the move, I am not getting any output to my log files.
Using Korn shell, this worked for me for some odd reason. This was sending... (2 Replies)
Discussion started by: metallica1973
2 Replies
5. Shell Programming and Scripting
Using echo command, send output to both places. I think I knew this but forgot. Thanks in advance (2 Replies)
Discussion started by: stevensw
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Does anyone know if there is an unzip command similar to
tar -xOf $tarBall $fileInTarFile
which will untar a single file in a tar ball to STDOUT ?
I want to do the same but with a .zip (ZIP archive) file.
- Andy
---------- Post updated at 05:56 PM ---------- Previous update... (0 Replies)
Discussion started by: andyatit
0 Replies
7. Shell Programming and Scripting
Is there a way to alter the file descriptor for stdout.?
sample:
#!/bin/ksh
exec 1>file
exec 2>file
echo hi --------->This will go to file
print -u4 "come statement"---->I want to make the file descriptor 4 to point to stdout.
The reason is ,I have a script which has lot of db2... (1 Reply)
Discussion started by: prasperl
1 Replies
8. Shell Programming and Scripting
Hy
I've got a little problem:
I work with ksh...
The application I start should write its output to a log file. It works but the problem is that as I have to run this application few times in a loop it overrites the file every time.:confused:
/proj/bre/tools/bin/bretestdriver... (2 Replies)
Discussion started by: lucae
2 Replies
9. Shell Programming and Scripting
Is there a way to redirect all stdout to a file implicitly - like defining stdout=/home/me/process.log - so that all "echo" commands in several scripts/subscripts are written to that file; instead of having to edit all scripts to redirect the "echo" (e.g. echo 'This is a test ' >>... (1 Reply)
Discussion started by: ALTRUNVRSOFLN
1 Replies
10. UNIX for Advanced & Expert Users
Hi all hope you can help as I am going MAD!!! :eek:
The below is in a shell script but the redirection in the sed line does not work and outputs to the screen and the $fname_2 does note get created ?????
Can any one help ??
#!/bin/ksh
cd /app/
for fname in `ls -1 X*`
do
sed 1d $fname... (3 Replies)
Discussion started by: mlucas
3 Replies