10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
First month learning about the Linux terminal and it has been a challenge yet fun so far. We're learning by using a gameshell. I'm trying to display a certain line ( only allowed 1 command ) from a file only using the head or tail. I'm pretty about this answer:
head -23 history.txt | tail -1... (1 Reply)
Discussion started by: forzatekk
1 Replies
2. UNIX for Advanced & Expert Users
Hello,
I have been working on script which need to generate an alert based upon live logs. If string is found then an alert mail must triggered.
tail -n -0 -F works fine to redirect the each latest line from live logs file to grep a pattern for matching but it seems to be not working on... (7 Replies)
Discussion started by: ketanraut
7 Replies
3. Shell Programming and Scripting
Linux backup command line or live CD?, what do you use? (4 Replies)
Discussion started by: kaja
4 Replies
4. Shell Programming and Scripting
Hi,
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Discussion started by: ketanraut
2 Replies
5. Shell Programming and Scripting
Hello Guys,
I have created function which is as follow:
tail -f filename |grep "Key word"
output from this command
19-11-2011 21:09:15,234 - INFO Numbement - error number:result = :11
19-11-2011 21:09:15,286 - INFO Numbement - error number:result = :11
19-11-2011 21:09:15,523 - INFO... (5 Replies)
Discussion started by: ooilinlove
5 Replies
6. Shell Programming and Scripting
Greetings, I'm new to this forum, also new to shell script
I have done some simple shell script before, like backup linux machine using rsync and crontab, but now I need to do some log analyzing, which is beyond my ability... so I'm going to seek for help in this forum, hope someone could give... (5 Replies)
Discussion started by: lunaticdawn
5 Replies
7. Shell Programming and Scripting
Hi ,
1)i want to display specific line number using tail command.
e.g. display 10 line from end.
Please help...
2)Want to display line 10 to 15 (from end)using tail command) (2 Replies)
Discussion started by: vivek1489
2 Replies
8. Shell Programming and Scripting
I don't quite know what I'm doing, so this simple script is proving a challenge.
Here is some pseudo code that doesn't work yet:
if tail -1 "WORKING.txt" >/dev/null | egrep "^NMBR=*" > /dev/null
then
curl -k 'http://www.myserver.com/log.cgi?input=$?'
echo "hi there"
fi
Purpose:... (3 Replies)
Discussion started by: dihewidd
3 Replies
9. Shell Programming and Scripting
I have a log file that is about 1.2 million lines long and about 300MB.
we need a way to clean up this file and only keep the last few thousand lines.
if i use tail command we run our of memory as the file is too big.
I do have a key word to match on.
example, we want to keep every line... (8 Replies)
Discussion started by: robsonde
8 Replies
10. Solaris
HI i have to copy the last 5000 lines form a log file and copy the same in the same file .overwriting the same log file.
ex: tail -5000 testfile1 > testfile2
cat testfile2
mv tesftfile2 testfile1
will produce the correct result.but i want to have this done in one line???? (4 Replies)
Discussion started by: saurabh84g
4 Replies