10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a log file which have a date and time at the start of every line.
I need to search the log file starting from a specific time to the end of file.
For example:
Starting point: July 29 2018 21:00:00
End point : end of file
My concern is what if the pattern of `July 29 2018 21:00:00`... (3 Replies)
Discussion started by: erin00
3 Replies
2. Shell Programming and Scripting
Hello,
I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file.
Putting that in bullet points:
Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies
3. Shell Programming and Scripting
logfile="/var/tmp.log"
output=$(grep "ERROR" $logfile)
if
then
echo "exceptions logged , please check /var/tmp.log for more details" |\
mail -s "exceptions logged , please check /var/tmp.log on for more details" $DL
else
echo "not found"
fi
Somehow its not working as... (5 Replies)
Discussion started by: ajothi
5 Replies
4. Shell Programming and Scripting
Hello,
I am new to shell scripting. I need to write a shell script where i can grep the name of file ie. .sh file and log file from crontab -l.
#51 18 * * * /home/oracle/refresh/refresh_ug634.sh > /home/oracle/refresh/refresh_ug634.sh.log 2>&1
#40 17 * * * /home/oracle/refresh/refresh_ux634.sh... (1 Reply)
Discussion started by: guptra
1 Replies
5. Shell Programming and Scripting
Hi,
I would like to execute a daily grep like:
grep 2010-09-06 statistics.log|grep API > /var/tmp/stat20100906_sp.txt
On date e.g. 2010-09-07 run a grep on yesterday's date, from the result grep the word "API" put all in /var/tmp
Would like to have a script configured in the crontab, running... (4 Replies)
Discussion started by: pointer
4 Replies
6. Shell Programming and Scripting
Hi Gurus,
I am facing a problem with grepping a set of data in active log file which are the info not in uniform, below is the sample data information.
I am trying to grep value.
Connect_PM Connect to APPS gateway failed
ERROR connection to host anyserver.com, service 6600 timed out
... (4 Replies)
Discussion started by: anakiar
4 Replies
7. Shell Programming and Scripting
Hello everyone. I have a log file that contains multiple domains:
www.thisdomain.com
agent.thisdomain.com
that.thisdomain.com
I need to copy all of the lines that contain "www.thisdomain.com" from the log and output them into a new file. I've tried everything with little luck. Please help... (3 Replies)
Discussion started by: aberli
3 Replies
8. Shell Programming and Scripting
Hi All,
I have a log file which is storing a backup time stamps information in it. (pasted below)
20081006210008 0 20081006211910
20081006222824 0 20081006224758
20081007210049 0 ... (2 Replies)
Discussion started by: suri.tyson
2 Replies
9. UNIX for Dummies Questions & Answers
Okay, I got a log file, and I need to use a combo of the tail -f command and the grep command, but I don't want to see all the output, other than what I'm "grepping". As well I'd like it to stop tailing and searching and just return to the command line, once it finds 1 line with that string in it.... (1 Reply)
Discussion started by: cbo0485
1 Replies
10. Shell Programming and Scripting
Hi
Im running a backup scriptwhich creates a log file
how do grep for the string in the logfile so the backup script can continue to next stage otherwise it will exit
i.e
12:32:53 INF - Client completed sending data for backup
12:33:02 INF - Backup by root on client lonbob04bak using... (4 Replies)
Discussion started by: eb222
4 Replies