Sponsored Content
Full Discussion: Issue Filtering Tail
Top Forums Shell Programming and Scripting Issue Filtering Tail Post 302371071 by steadyonabix on Friday 13th of November 2009 09:59:49 AM
Old 11-13-2009
Code:
tail -f imp.log | nawk '!/Bps/' | sed -e 's/\ \[\<strategy.SNTH\>\]//g' -e 's/\([0-9][0-9]\),[^ ]*/\1/g'



---------- Post updated at 02:47 PM ---------- Previous update was at 02:40 PM ----------

This is a slightly stronger match: -

Code:
tail -f imp.log | nawk '!/Bps/' | sed -e 's/\ \[\<strategy.SNTH\>\]//g' -e 's/\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\),[0-9][0-9]*/\1/g'



---------- Post updated at 02:59 PM ---------- Previous update was at 02:47 PM ----------

Your pattern for strategy.SNTH is a little overcomplicated: -

Code:
s/ \[strategy.SNTH\]//g

is sufficient
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using tail -f

Working in HP-UX 10.20. I eventually want to write a bourne shell script to handle the following problem, but for now I am just toying with it at the command line. Here's what I am basically trying to do: tail -f log_X | grep n > log_Y I am doing a tail -f on log_X . Once it sees "n", I... (6 Replies)
Discussion started by: cdunavent
6 Replies

2. Shell Programming and Scripting

tail -f

I am trying to extract a particular line from a.log which keeps appending every sec and output that into a newfile b.log which should append itself with filtered data received from a.log I tried tail -f a.log |grep fail| tee -a b.log nothing in b.log tail -f a.log |grep fail >>b.log ... (4 Replies)
Discussion started by: wannalearn
4 Replies

3. Shell Programming and Scripting

Sed filtering issue

The problem I have is that I have 23,000 records I need to sort through to pull out LEN: XXXX XX XX XX XX and NCOS: XXX entries from so I can insert them into a database. But some of my records include TYPE: ISDN, THE DN IS UNASSIGNED, or INVALID entries in between some records and I would like... (2 Replies)
Discussion started by: roachmmflhyr
2 Replies

4. Shell Programming and Scripting

Report filtering - Weird issue and interesting - UrgentPlease

Hi, Could any one help me to extract data from a report. I would like to get the two lines which are just below the separations I have a report like this -------------------------------------------------------------------------- Pid Command Inuse Pin Pgsp Virtual... (2 Replies)
Discussion started by: ajilesh
2 Replies

5. Shell Programming and Scripting

tail issue!

Hi, I had few scripts which were running fine on linux: uname -a Linux ######### 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux from some front end application. Recently there was a migration of this application on some other linux m/c: uname -a... (4 Replies)
Discussion started by: dips_ag
4 Replies

6. Shell Programming and Scripting

AWK / tail Issue

Hello, I am using a tail command to fetch the line before last in a log file. the two last lines are as followed: 11-01-16 11:55:45.174 | CClientObject::InitTraceLevelInCache Starting CClientObject::InitTraceLevelInCache End I am doing a awk statement to gather only the numeric... (1 Reply)
Discussion started by: LiorAmitai
1 Replies

7. UNIX for Dummies Questions & Answers

Grep filtering issue

Hi, I am on uname -a HP-UX mymachine B.11.31 U ia64 3223107173 unlimited-user license ps -exx| grep java | grep -i "GrafiteEventsInterfaces*" 19955 ? 55:22 /opt/app/app1/jdk150_07/bin/IA64N/java -server -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m... (2 Replies)
Discussion started by: mohtashims
2 Replies

8. Shell Programming and Scripting

Joining multiple files tail on tail

I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250. I would like to join all 250 of them together tail by tail as follows. For example stat.1000 a b c d e f stat.1001 g h i j k l So that my output... (2 Replies)
Discussion started by: kayak
2 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Tail command issue in Linux

Hello, When I am trying to use tail +13 filename.csv it is throwing an error. tail: cannot open `+13' for reading: No such file or directory and then prints last 10 lines of the file. (File is present on the path) But when i try tail -13 filename.csv it runs perfectly. Could I have... (5 Replies)
Discussion started by: AnkitSenghani
5 Replies

10. Shell Programming and Scripting

Tail +

because the tail +2 on the first line gives me the file name pomga I do not want anything like what I miss tail +2 ejemplo.txt ouput ==> ejemplo.txt <== 1 2 3 4 5 6 7 8 9 10 (2 Replies)
Discussion started by: tricampeon81
2 Replies
ldi_strategy(9F)					   Kernel Functions for Drivers 					  ldi_strategy(9F)

NAME
ldi_strategy - Device strategy request SYNOPSIS
#include <sys/sunldi.h> int ldi_strategy(ldi_handle_t lh, struct buf *bp); PARAMETERS
lh Layered handle. bp Pointer to the buf(9S) structure. DESCRIPTION
The ldi_strategy() function passes a strategy request to the device entry point for the device specified by the layered handle. This opera- tion is supported for block devices. RETURN VALUES
The ldi_strategy() function returns 0 if the strategy request has been passed on to the target device. Other possible return values are: EINVAL Invalid input parameters. ENOTSUP Operation is not supported for this device. Once the request has been passed on to the target devices strategy entry point, any further errors will be reported by bioerror(9F) and biodone(9F). See the strategy(9E) entry point for more information. CONTEXT
This function may be called from user or kernel context. SunOS 5.10 3 June 2003 ldi_strategy(9F)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy