10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi
Can't see what I am doing wrong here:
Trying to view a log file and grep for WARNING but keep getting the following error:
$ view datasource.log | grep WARN
Vim: Warning: Output is not to a terminal
WARNING: JMX not enabled. To enable, specify rmi-client-port and rmi-registry-port... (2 Replies)
Discussion started by: simpsa27
2 Replies
2. 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
3. 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
4. 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
5. 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
6. 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
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. UNIX for Advanced & Expert Users
I want to grep a portion of the log file. grepping a particular pattern and including 10 lines before that and after that occurence.
grep -n "SomeString Pattern" filename
10 lines before this occurence and 10 lines after that.
Please help. Need the simple script not in awk or sed. (9 Replies)
Discussion started by: sainipardeep
9 Replies
9. 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
10. Shell Programming and Scripting
Hi
Currently I can grep a log file with the following command:
$results = `grep -A 2 '^$date.$time.*' $log`;
and the following arguments:
$date = 2007/04/25
$time = 16:07
Log example:
2007/04/25 16:07:12.145701
2007/05/25 14:07:12.145701
2007/05/25 17:07:12.145701
2007/06/25... (37 Replies)
Discussion started by: Epiphone
37 Replies