Sponsored Content
Full Discussion: filtering the log file
Top Forums Shell Programming and Scripting filtering the log file Post 302530268 by Skrynesaver on Monday 13th of June 2011 11:26:21 AM
Old 06-13-2011
Code:
cut -d\[  -f2 <file.log| cut -d \] -f1
OR 
awk -F'\[' '{print "["$2}' file.log

Update Doh, Corona's solution below is much neater, though the cut could be updated to
Code:
cut -d\  -f4 <file.log


Last edited by Skrynesaver; 06-13-2011 at 12:31 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Filtering line out of file

Hy, I would like to extract lines within following file, 4TX + 4XFUT + 4XBACK + 4Xexp: theo. actual start of day: -2 5 end of day: 5 4 profit: 2 -1 ==================== trade profit: 9 -2... (9 Replies)
Discussion started by: sam786
9 Replies

2. UNIX for Dummies Questions & Answers

Filtering Log file

Hi, Iam trying to filter a log file in the below format |fffff|hhhhh|ffff|dd|mm|yy|hh|min||dd|mm|yy|hh|min the first set of |dd|mm|yy|hh|min is when the application ran the second set of |dd|mm|yy|hh|min when it ended. I will be removing the last of the months in the log file to... (1 Reply)
Discussion started by: baanprog
1 Replies

3. Shell Programming and Scripting

Filtering the yesterdays date from log files via script.

hi All, I have this sample text file - access.log: Jan 18 21:34:29 root 209.151.232.70 Jan 18 21:34:40 root 209.151.232.70 Jan 18 21:34:43 root 209.151.232.70 Jan 18 21:34:56 root 209.151.232.70 Jan 18 21:35:10 root 209.151.232.70 Jan 18 21:35:23 root 209.151.232.70 Jan 18 21:36:04 root... (2 Replies)
Discussion started by: linuxgeek
2 Replies

4. UNIX for Dummies Questions & Answers

Filtering a file

I have a list of directories looking something like; /usr/local/1/in /usr/local/1/out /usr/local/1/archive /usr/local/2/in /usr/local/2/out /usr/local/2/archive /usr/local/3/in /usr/local/3/out /usr/local/3/archive Is there a way I can filter the out and archive directories so I... (5 Replies)
Discussion started by: JayC89
5 Replies

5. Shell Programming and Scripting

filtering the rows in a file

hi all, please help on this isssue, i have a file which contains something like this and i want to seprate the servers which has vasd.pid ,i need only server names. i want output something like this which vasd.pid . server1 server3 server4 (4 Replies)
Discussion started by: sudharson
4 Replies

6. UNIX for Dummies Questions & Answers

Filtering records from 1 file based on some manipulation doen on second file

Hi, I am looking for an awk script which should help me to meet the following requirement: File1 has records in following format INF: FAILEd RECORD AB1234 INF: FAILEd RECORD PQ1145 INF: FAILEd RECORD AB3215 INF: FAILEd RECORD AB6114 ............................ (2 Replies)
Discussion started by: mintu41
2 Replies

7. Shell Programming and Scripting

Filtering first file columns based on second file column

Hi friends, I have one file like below. (.csv type) SNo,data1,data2 1,1,2 2,2,3 3,3,2 and another file like below. Exclude data1 where Exclude should be treated as column name in file2. I want the output shown below. SNo,data2 1,2 2,3 3,2 Where my data1 column got removed from... (2 Replies)
Discussion started by: ks_reddy
2 Replies

8. Shell Programming and Scripting

PERL "filtering the log file removing the duplicates

Hi folks, I have a log file in the below format and trying to get the output of the unique ones based on mnemonic IN PERL. Could any one please let me know with the code and the logic ? Severity Mnemonic Log Message 7 CLI_SCHEDULER Logfile for scheduled CLI... (3 Replies)
Discussion started by: scriptscript
3 Replies

9. Shell Programming and Scripting

Filtering log file with lines older than 10 days.

Hi, I am trying to compare epoch time in a huge log file (2 million lines) with todays date. I have to create two files one which has lines older than 10 days and another file with less than 10 days. I am using while do but it takes forever to complete the script. It would be helpful if you can... (12 Replies)
Discussion started by: shunya
12 Replies

10. Shell Programming and Scripting

Need help with filtering records in a file

Hi, I have following records in a file more file1.txt setting applicaction ABC for user setting applicaction CDE for user setting applicaction XXX for user logging applicaction XXX for user I need to filter out records which have strings " setting... (5 Replies)
Discussion started by: manid
5 Replies
MODEMMANAGER(8) 					      System Manager's Manual						   MODEMMANAGER(8)

NAME
ModemManager - modem management daemon SYNOPSIS
ModemManager [--version] | [--help] ModemManager [--debug] [--log-level=<level>] [--log-file=<filename>] [--timestamps] [--relative-timestamps] DESCRIPTION
The ModemManager daemon provides a unified high level API for communicating with (mobile broadband) modems. While the basic commands are standardized, the more advanced operations (like signal quality monitoring while connected) varies a lot. ModemManager is a system daemon and is not meant to be used directly from the command line. OPTIONS
The following options are supported: --version Print the ModemManager software version and exit. --help Print ModemManager's available options and exit. --debug Runs ModemManager with "DEBUG" log level and without daemonizing. This is useful for debugging, as it directs log output to the con- trolling terminal in addition to syslog. --log-level=<level> Sets how much information ModemManager sends to the log destination (usually syslog's "daemon" facility). By default, only informa- tional, warning, and error messages are logged. Given level must be one of "ERR", "WARN", "INFO" or "DEBUG". --log-file=<filename> Specify location of the file where ModemManager will dump its log messages, instead of syslog. --timestamps Include absolute timestamps in the log output. --relative-timestamps Include timestamps, relative to the start time of the daemon, in the log output. SEE ALSO NetworkManager(8). 31 October 2011 MODEMMANAGER(8)
All times are GMT -4. The time now is 04:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy