10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi,
How can I redirect the output of a following command to a variable.
ftp myservername
ftp> user
(username) guptaji
331 Password required for guptaji.
Password:
ftp> size /home/salil/abc.dat
ftp> a='size /home/salil/abc.dat'
?Invalid command
I want to redirect value of size to... (1 Reply)
Discussion started by: Salil Gupta
1 Replies
3. 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
4. Shell Programming and Scripting
Hi,
I have a requirement to store oracle sqlplus output to some unix variable, count the records and then print the output on the screen.
Can you please point me to any sample program for reference purpose.
Thanks a lot for your time. (0 Replies)
Discussion started by: bhupinder08
0 Replies
5. Shell Programming and Scripting
Hi,
I would like to list files: ls *.hdf
But I would like a copy of the output directed to the screen, but also APPENDED to a text file: test.txt
I have tried:
ls *.hdf | tee test.txt
However, that will just write over everything already existing in test.txt. How can I append the... (1 Reply)
Discussion started by: msb65
1 Replies
6. Shell Programming and Scripting
i want to redirect the grep output into the variable
but i am not able to get it
i tried
veri=`grep -i $1 "${logdir}"* | grep -i adding | grep -iv equation | tail -1 | cut -d ':' -f 1`
vari=$(grep -i $1 "${logdir}"* | grep -i adding | grep -iv equation | tail -1 | cut -d ':' -f 1)
BUT NOT... (1 Reply)
Discussion started by: mail2sant
1 Replies
7. Shell Programming and Scripting
Hi all, I have a script which call a java program, the logging (to log file) in the program is done using log4j. However, as a safety measure, i still choose to direct standard error to another log file as follow
/usr/bin/java -classpath ${classpath} -Xmx128m TestingProgram 2>>... (1 Reply)
Discussion started by: mpang_
1 Replies
8. 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
9. UNIX for Dummies Questions & Answers
how make assign the output of the command (for example: grep "file" "string" ) in a variable ($name)?
i thing how put the result of the command (grep , cut, find ecc) in a variable..
IT's Possible ?? (1 Reply)
Discussion started by: ZINGARO
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am looking for a way to redirect the result from a command into a variable.
This is the scenario.
Using the find command I will be getting multiple records/lines back.
Here is the command I am using:
find /”path”/ -name nohup.out -print
This now is giving me the paths and file... (1 Reply)
Discussion started by: hugow
1 Replies