10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Bonjour,
I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things.
The script use the following technique :
tail -fn0 $logfile | \
while read line ; do
... some stuff
done
First one, I'd like a way to end the monitoring script if a... (3 Replies)
Discussion started by: Warluck
3 Replies
2. Shell Programming and Scripting
Hi, I have a log file from Munin like this:2012/12/04 13:45:31 : Munin-update finished (29.68 sec)
2012/12/04 13:50:01 Opened log file
2012/12/04 13:50:01 : Starting munin-update
2012/12/04 13:50:01 Error occured in under in the configuration.
2012/12/04 13:50:01 Could not parse datafile... (9 Replies)
Discussion started by: Jotne
9 Replies
3. UNIX for Dummies Questions & Answers
I am trying to compare the data in lines 3 & 5 to see if they match up to the '-S570' (see first code set, all proprietary information has been removed from code set)
spawn telnet
Trying ...
Connected to CA-LOS1234-ASE-S570.cl .
Escape character is '^]'.
CA-LOS1234-ASE-S570
Username: ... (1 Reply)
Discussion started by: slipshft
1 Replies
4. Shell Programming and Scripting
I have a txt file of the following format
>ab_
qwerty
>rt_
hfjkil
>Ty2
hglashglkasghkf;
>P2
aklhfklflkkgfgkfl
>ui_
vnllkdskkkffkfkkf
>we32
vksksjksj;lslsf'sk's's
....
.....
I want to split this big file based on the header (>) (5 Replies)
Discussion started by: Lucky Ali
5 Replies
5. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
6. Shell Programming and Scripting
Hi there, I have a bunch of vlan tagged network interfaces that are named as follows
e1000g111000
e1000g99001
e1000g3456000
nge2002
where the 'e1000g' and 'nge' parts of the name are the driver, the red and blue bits above define the VLAN and the last digit on the end defines the... (3 Replies)
Discussion started by: rethink
3 Replies
7. UNIX for Dummies Questions & Answers
Given the following text in a file named extract.txt:
listenPort:=25
smtpDestination:=2
enableSSL:=
I am trying to extract only the value 2 following smtpDestination:=
Someone had suggested I use:
sed -e "s/^smtpDestination:=\(.*\)$/\1/" extract.txt
but this returns:
listenPort:=25
2
... (2 Replies)
Discussion started by: cleanden
2 Replies
8. Shell Programming and Scripting
I've got a log file from automatic diagnostic runs. The log file is appended to each time an automatic log is run.
I'd like to just pull certain lines from each run in the log file, and concatenate them into 1 comma delimited line (for export into excel or an html table).
Each diagnostic run... (3 Replies)
Discussion started by: BecTech
3 Replies
9. Shell Programming and Scripting
Hi people,
I've encountered a problem. I have a data file like:
asd:$123:2
zxc:$456:4
But when I want to extract "$123" and get the number with this command:
echo $123 | cut -c 1-10
Im returned with 23 instead of 123.
Please help me out, thanks. (4 Replies)
Discussion started by: grotesque
4 Replies
10. Shell Programming and Scripting
Hello All,
I am trying to write a KSH script that would extract lines from a logfile, within a certain timeframe, in reverse order.
Ex.
-Sample logfile-
INFO 2006-07-12 00:23:00 - ModeDecision Time in WF:27
INFO 2006-07-12 00:24:00 - NRT_MQ_RES:108
INFO 2006-07-12 00:25:00 - getRecords()... (2 Replies)
Discussion started by: harpdl
2 Replies