10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have simple program that generate log file 1 line every sec, i need to do grep for specific record then redirect to another file.
#!/bin/bash
for i in `seq 1 20`;
do
echo $i
sleep 1
done
./test.sh |egrep "5|10|15"
5
10
15
r
./test.sh... (2 Replies)
Discussion started by: before4
2 Replies
2. Shell Programming and Scripting
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
3. Shell Programming and Scripting
Hi,
I'd like to redirect the STDOUT output from my script to a file and simultaneously display it at a console.
I've tried this command:
myscript.sh | tail -f
However, it doesn't end after the script finishes running
I've also tried this:
myscript.sh | tee ~/results.txt
But it writes... (3 Replies)
Discussion started by: wenclu
3 Replies
4. Shell Programming and Scripting
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Discussion started by: aix_admin_007
4 Replies
5. Solaris
Hi, I put a for loop in a script to eject backup tapes from the robot. The command echo' output goes to the log file without problem, but command vmchange's output does not go to the log file although it's working fine. It still displays on the screen. I've tried '2>&1 1>$log', but nothing changed.... (5 Replies)
Discussion started by: aixlover
5 Replies
6. Shell Programming and Scripting
I've been using tftp in one of my file
#!/bin/bash
filename1="config1h.txt"
filename2="config15.txt"
hostname="test.com"
tftp $hostname <</dev/null
get $filename1
get $filename2
quit
EOF
My output looks like this
# ./test3.sh
tftp> Received 1262 bytes in 0.0 seconds
tftp> Received... (2 Replies)
Discussion started by: LavanyaP
2 Replies
7. Programming
Dear All:
I am trying to do something that (I thought) was relatively straightforward, but my code snippet does not seem to work.
Any suggestions?
Thank you
Sincerely yours
Misha Koshelev
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include... (0 Replies)
Discussion started by: misha680
0 Replies
8. Shell Programming and Scripting
Hi,
I have a process running in the background, which throws up some output to the terminal when I run my script. How can I read this output from my script?
Thank you. (5 Replies)
Discussion started by: Theju
5 Replies
9. Shell Programming and Scripting
hi,
i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (11 Replies)
Discussion started by: kripssmart
11 Replies
10. Shell Programming and Scripting
I'm trying to redirect awk's output to a BASH variable. Currently the statement looks like this
options=`awk '{ while (i < NF) { print $i; ++i } }' answer
but for some reason that makes $options look like this:
1 2 3 4
1
2
3
Now, the input file 'answer' is taken from a dialog... (3 Replies)
Discussion started by: dhinge
3 Replies