Sponsored Content
Top Forums Shell Programming and Scripting Data sorting out from log file Post 302845325 by batka on Wednesday 21st of August 2013 09:11:28 AM
Old 08-21-2013
Data sorting out from log file

I have a logfile looks like this:
Code:
 [2013-08-16 03:24:39,192][INFO ][AbstractServiceInvoker          [SID:187175558][] Received request of type [ReportNotification]

I need two write out every line to a new file if contains [INFO ] to a file called the SID name, like 187175558_xyz.txt

Thanks for helping!

---------- Post updated at 08:11 AM ---------- Previous update was at 08:10 AM ----------

I got this one liner:
Code:
awk -F'[]:]' '/INFO/ {print > ($6 "_xyz.txt")}' file

How can I do this in script file?
Thanks


Moderator's Comments:
Mod Comment Please use code tags for your code and data

Last edited by vbe; 08-21-2013 at 10:14 AM.. Reason: code tags!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sorting data from who by IP

Hello. I have an RS/6000 running AIX 4 and I need to be able to see if there are any users that are logged on more than once from the same terminal so I can kick them off to make room for other terminals. 64 connections is the limit. Currently I am doing this: who | more and then manually... (11 Replies)
Discussion started by: raidzero
11 Replies

2. Shell Programming and Scripting

PERL data - sorting

Hello, I have a page where multiple fields and their values are displayed. But I am able to sort only a few fields. When I looked into the issue, it is seen that the for each row of info , an unique id is generated and id.txt is generated and saved. Only those fields which are inside that id.txt... (3 Replies)
Discussion started by: eagercyber
3 Replies

3. UNIX for Dummies Questions & Answers

Sorting data in an ASCII file

Hi,,, is there anyway to sort the data that I have on an ASCII file, using unix? :confused::confused::confused: Thanks (2 Replies)
Discussion started by: cosmologist
2 Replies

4. UNIX for Dummies Questions & Answers

Sorting data from a to z

Hi, Let's say I have these 3 columns; NGC1234 6 9 SL899 4 1 NGC1075 8 3 SL709 5 2 And I want to sort the data according to the first column (from a to z) like having them as: NGC1075 8 3 NGC1234 6 9 SL709 5 2 SL899 4 1 Can that be done... (2 Replies)
Discussion started by: cosmologist
2 Replies

5. UNIX for Dummies Questions & Answers

Sorting data

Hello guys. I need help figuring this one out. It's probably really easy. Thanks in advance! I have a file say for example containing this: Rice Food Carrots Food Beans Food Plates Kitchen Fork Kitchen Knives Kitchen I need: Food Rice, Carrots, Beans Kitchen Plates, Fork,... (7 Replies)
Discussion started by: visuelz
7 Replies

6. UNIX for Dummies Questions & Answers

Help with Data Sorting

Hi All, I have a long list made of 4 columns containing entries such as the following example: a b c d 0 0 0 0 1 2 1 2 2 5 3 4 3 8 4 6 4 10 9 8 5 15 8 10So the top row is the header and I need to arrange the data in a way as to... (11 Replies)
Discussion started by: pawannoel
11 Replies

7. Shell Programming and Scripting

Sorting the Data

My actual data looks like below i have given only format. i can't give exact data format of my requirement due to some reasons. I this set of data lines about 5000 I need to come up with information in below exact format of my data set : Line<space>Number1<space>"somedata":... (1 Reply)
Discussion started by: ckaramsetty
1 Replies

8. UNIX for Dummies Questions & Answers

Sorting data in file based on field in another file

Hi, I have two files, one of which I would like to sort based on the order of the data in the second. I would like to do this using a simple unix statement. My two files as follows: File 1: 12345 1 2 2 2 0 0 12349 0 0 2 2 1 2 12350 1 2 1 2 2 2 . . . File2: 12350... (3 Replies)
Discussion started by: kasan0
3 Replies

9. Solaris

Monitoring log file for entries - Find command & sorting

hi, I would like to monitor a log file, which rolls over, everytime a server is restarted. I would like to grep for a string, and to be more efficient i'd like to grep only newly appended data. so something like a 'tail -f' would do, however, as the log rolls over i think a 'tail -F' is... (2 Replies)
Discussion started by: horhif
2 Replies

10. Shell Programming and Scripting

Sorting data file by date and time

Hello. Sorting data file by date and time with the following issues: Date is in the following format m/d/yyyy, no leading zeros Time is in the following format h:m:s AM/PM, no leading zeros Any ideas on how to sort data when the above issues? Could the date/time be converted inline to... (5 Replies)
Discussion started by: JimBurns
5 Replies
LINTIAN-INFO(1)                                         User Contributed Perl Documentation                                        LINTIAN-INFO(1)

NAME
lintian-info - give detailed information about Lintian's error tags SYNOPSIS
lintian-info [log-file...] lintian-info --tags tag ... DESCRIPTION
The lintian-info command parses the output of the lintian command and gives verbose information about the listed Lintian error tags, parses a Lintian override file and gives verbose information about the tags included, or (if given the -t or --tags option) explains a given tag or tags. If no log-file is specified on the command line, this command expects its input on stdin. Thus, the output of lintian can either be piped through lintian-info or a log file produced by lintian can be processed with this command. (Note, though, that the lintian command has a command line option -i to display the same results as lintian-info, so you will not normally need to pipe the output of lintian into this command.) OPTIONS
-a, --annotate Read from standard input or any files specified on the command line and search the input for lines formatted like Lintian override entries. For each one that was found, display verbose information about that tag. -h, --help Display usage information and exit. --profile prof Use the severities from the vendor profile prof when displaying tags. If the profile name does not contain a slash, the default profile for than vendor is chosen. If not specified, lintian-info loads the best profile for the current vendor. Please Refer to the Lintian User Manual for the full documentation of profiles. -t, --tags Rather than treating them as log file names, treat any command-line options as tag names and display the descriptions of each tag. EXIT STATUS
If -t or --tags was given and one or more of the tags specified were unknown, this command returns the exit code 1. Otherwise, it always returns with exit code 0. SEE ALSO
lintian(1) AUTHORS
Niels Thykier <niels@thykier.net> Richard Braakman <dark@xs4all.nl> Christian Schwarz <schwarz@monet.m.isar.de> perl v5.14.2 2013-02-16 LINTIAN-INFO(1)
All times are GMT -4. The time now is 12:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy