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
Any better way to extract the last 10 minutes from logfile?
Dec 18 09:41:18 aaa
Dec 18 09:46:29 aa
Dec 18 09:48:39 vvv
Dec 18 09:48:54 bbb
Dec 18 09:54:47 bbb
Dec 18 09:55:33 fcf
Dec 18 09:55:38 ssdf
Dec 18 09:57:58 sdsds
Dec 18 09:58:10 sdsd
Dec 18 10:00:50 sdsd
Dec 18... (5 Replies)
Discussion started by: timmywong
5 Replies
3. UNIX for Dummies Questions & Answers
Hi !
my input looks like that:
--AAA-AAAAAAA---------AA-
AAA------AAAAAAAAAAAAAA
------A----AAAA-----A-------
Using awk, I would need to replace only the "-" located between the last letter and the end of the string by "~"
in order to get:
--AAA-AAAAAAA---------AA~... (7 Replies)
Discussion started by: beca123456
7 Replies
4. Shell Programming and Scripting
Hello Everyone,
I am looking for a way to extract substrings to local variables. Here is the format of the string variable i am using :
/var/x/www && /usr/x/share/doc && /etc/x/logs
where the substrings i must extract are the "/var/x/www" and such.
I was originally thinking of using... (15 Replies)
Discussion started by: jimmy75_13
15 Replies
5. Shell Programming and Scripting
Hi ,
Can someone help me,I am not well versed with scripting,it is very urjent.
Need a script in perl or shell for the following task.
The logfile contains several entries of which one particular string to be searched and that complete line has to be removed and copied to another file to... (25 Replies)
Discussion started by: garryt21@rediff
25 Replies
6. Shell Programming and Scripting
Log File:
Attempting to contact (DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname1.com)(PORT=1521)))(CONNECT_DATA=(SID=database1)(SRVR=DEDICATED)))
Attempting to contact... (2 Replies)
Discussion started by: techychap
2 Replies
7. Shell Programming and Scripting
Hi guys,
I am stuck in this problem. Please help.
I have two files.
FILE1 (with records starting from '>' )
>TC1723_3 similar to Scific_A7Q9Q3
EMSPSQDYCDDYFKLTYPCTAGAQYYGRGALPVYWNYNYGAIGEALKLDLLNHPEYIEQN
ATMAFQAAIWRWMNPMKKGQPSAHDAFVGNWKP
>TC214_2 similar to Quiet_Ref100_Q8W2B2 Cluster;... (1 Reply)
Discussion started by: smriti_shridhar
1 Replies
8. AIX
In AIX 4.2, are there any shell commands to do substrings and the text like manipulation commands ?
I want to take an error log where errors are multi-ligned and convert them into single lines to ease tracking/monitoring. I may need to shorten them out too.
If I can manage to put them into an... (2 Replies)
Discussion started by: Browser_ice
2 Replies
9. Shell Programming and Scripting
I have a very long string (millions of characters).
I have a file with start location and length that is thousands of rows long:
Start Length
5 10
16 21
44 100
215 37
...
I'd like to extract the substring that corresponds to the start and length from each row of the list:
I tried... (7 Replies)
Discussion started by: dcfargo
7 Replies
10. Shell Programming and Scripting
I'm only new to shell programming and have been given a task to do a program in .sh, however I've come to a point where I'm not sure what to do. This is my code so far:
# process all arguments (i.e. loop while $1 is present)
while ; do
# echo "Arg is $1"
case $1 in
-h*|-H*) echo "help... (4 Replies)
Discussion started by: switch
4 Replies