Sponsored Content
Operating Systems Linux Red Hat Need help with a shell script for finding a certain pattern from log file Post 302495770 by rockf1bull on Friday 11th of February 2011 06:31:48 AM
Old 02-11-2011
Hi Franklin,

Just updating on your help for the script the other day..

Amazing job once again and it has helped me a LOT!!Smilie

Code:
ls abc-accent*.log |
while read file
do
  sed -n 's!.*service=\(http://[^/]*/[^/]*/\).*!\1!p' "$file" > URL_file
done

Hopefully I won't bug everyone so often now.Smilie
You can mark this as "Resolved" now if there is any such case.

Cheers,
Andy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help with finding & replacing pattern in a file

Hi everyone. Could u be so kind and help me with on "simple" shell script? 1. i need to search a file line by line for a pattern. example of a lines in that file 2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name Values:snNo = f10 Add AttFlag = 0 2. i need to find... (0 Replies)
Discussion started by: dusoo
0 Replies

2. Shell Programming and Scripting

script for finding an error from a log file

Hi , I have a doubt about a shell script to find an ERROR from the log file. But I need to specify a the scan from a particular date and time in the log. Till now I have developed the following script. Please suggest what shall I add in this for date and time. If the script finds a particular... (5 Replies)
Discussion started by: himvat
5 Replies

3. Shell Programming and Scripting

Script to monitor the pattern in the log file

hi All, how to find a pattern in the log file & display the above and below line for example in the log file, i have many lines, whenever i search for "Category" it should display the above line with only few parameter like i want only the location name & department name Thu Jul 02 11:05:23... (2 Replies)
Discussion started by: rithick256
2 Replies

4. Homework & Coursework Questions

shell script that can create, monitor the log files and report the issues for matching pattern

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write an automated shell program(s) that can create, monitor the log files and report the issues for matching... (0 Replies)
Discussion started by: itian2010
0 Replies

5. Shell Programming and Scripting

Finding log files that match number pattern

I have logs files which are generated each day depending on how many processes are running. Some days it could spin up 30 processes. Other days it could spin up 50. The log files all have the same pattern with the number being the different factor. e.g. LOG_FILE_1.log LOG_FILE_2.log etc etc ... (2 Replies)
Discussion started by: atelford
2 Replies

6. Shell Programming and Scripting

Finding the pattern and replacing the pattern inside the file

i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of value abc and ccc in the place of them. Input File: go to &abc=ddd; if... (16 Replies)
Discussion started by: saaisiva
16 Replies

7. Shell Programming and Scripting

Finding file pattern in ksh 88

Hi, I've to find the file which has the pattern "Delete Report for History Tables" and need to search this file pattern from directory which has sub directories as well. I'm using ksh 88 Please suggest me which command will be used to find the file pattern . Thanks. (1 Reply)
Discussion started by: smile689
1 Replies

8. Shell Programming and Scripting

Script to search for a pattern in 30 minutes from a log file

Hello All, I have to write a script which will search for diffrent patterns like "Struck" "Out of Memory" , etc from a log file in Linux box's. Now I will be executing a cron job to find out the results by executing the script once in every 30 minutes. suppose time is 14-04-29:05:31:09 So I... (3 Replies)
Discussion started by: Shubhasis Mathr
3 Replies

9. Shell Programming and Scripting

Finding file extension on C Shell script

I very new to C Shell. I am trying to do is read from Command line. Find the if the file is zip, .txt, symbloic link,pipe, unknow (if file is not zip, txt, sy....) here is what I what got so far. I am very stuck atm Please help me out : If the file is symblooc link what file is link to ... (12 Replies)
Discussion started by: madbull41
12 Replies

10. Shell Programming and Scripting

Finding the file name in a directory with a pattern

I need to find the latest file -filename_YYYYMMDD in the directory DIR. the below is not working as the position is shifting each time because of the spaces between(occuring mostly at file size field as it differs every time.) please suggest if there is other way. report =‘ls -ltr... (2 Replies)
Discussion started by: archana25
2 Replies
Data::Format::HTML(3pm) 				User Contributed Perl Documentation				   Data::Format::HTML(3pm)

NAME
Data::Format::HTML - Format Perl data structures into simple HTML SYNOPSIS
use Data::Format::HTML; my $f = Data::Format::HTML->new; my %hash = (simple => 'hash'); # Of course it's very unlikely that you won't deal ever with this # kind of structure, but HTML is able to hand it all anyway :) my $struct = { foo => 'bar', 1 => 2, 'hello' => 'goodbye', array_ref => [qw/one two three/], nested_hash => \%hash, [qw/1 2/] => sub { die; }, even_more => { arr => { 1 => [2, 3, 4], this_is_insane => { a => { b => { c => { d => { e => 'z'}}}}} }, }, }; $struct->{'Data::Format::HTML handles it all'} = $f; print $f->format(); And that will output the following insane, but possible, for the sake of showing, HTML: In theory you can pass any kind of Perl data structure to "format" and you will get its data HTML-formatted. TODO
o A LOT. ;) o Explain how CSS can prettify the tables (specification for everything) o Get CSS. o Better support for GLOB, CODE, REF and company. o Extend this documentation. SEE MORE
The author keeps the versioned code at GitHub at: http://github.com/damog/data-format-html/tree/master <http://github.com/damog/data- format-html/tree/master>. AUTHOR
David Moreno Garza, <david@axiombox.com> - <http://damog.net/> THANKS
To Raquel (<http://www.maggit.com.mx/>), who makes me happy every single day of my life. COPYRIGHT AND LICENSE
Copyright (C) 2008 by David Moreno Garza This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. The Do What The Fuck You Want To public license also applies. It's really up to you. perl v5.12.3 2009-07-17 Data::Format::HTML(3pm)
All times are GMT -4. The time now is 07:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy