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
msg.sh
#!/bin/bash
if
then
echo "starting service"
else
echo " service not started"
echo " Please check the start.sh file or manuly start the service"
fi
if i login with root credentials @12.36.34.123 with passwd
username:root
passwd:abc
once i login into linux pc... (6 Replies)
Discussion started by: saku
6 Replies
3. 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
4. Programming
hi,
i have a html form which call a perl program, this perl program calls a shell script.
<html>
<head>
<title>demo</title>
</head>
<body>
<form name="frm1" action="/cgi-bin/perl_script.pl" method="post">
<input type="text" name="fname">
... (1 Reply)
Discussion started by: Little
1 Replies
5. 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
6. Shell Programming and Scripting
My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies
7. Shell Programming and Scripting
Hi
can anyone tell me how to redirect the ouput of a cvs command to a file as well as the console?
i tried using
cvs add <filename> | tee logFile
cvs add <filename> 2>logFile 2>&1
All i could get is only on console or on file.
Please help
Thanks (2 Replies)
Discussion started by: ankitag2010
2 Replies
8. Shell Programming and Scripting
How to redirect the output to multiple files without putting on console
I tried tee but it writes to STDOUT , which I do not want.
Test.sh
------------------
#!/bin/ksh
echo "Hello " tee -a file1 file2
----------------------------
$>./Test.sh
$>
Expected output:
-------------------... (2 Replies)
Discussion started by: prashant43
2 Replies
9. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
10. 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