Sponsored Content
Top Forums Shell Programming and Scripting How to print with awk specific field different from specific character? Post 302845663 by rdcwayx on Thursday 22nd of August 2013 03:59:44 AM
Old 08-22-2013
I get the answer same as in your first post.
Code:
awk '$5!="0"||$7!="0"' number

DirB    port    71      er_enc_out      56       er_bad_os       0
DirB    port    75      er_enc_out      0       er_bad_os       45
DirB    port    78      er_enc_out      12       er_bad_os       0
DirB    port    203     er_enc_out      0       er_bad_os       19
DirB    port    206     er_enc_out      4       er_bad_os       6

If you get difference, please try with nawk or /usr/xpg4/bin/awk.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to append a character to the last but one field on a specific line?

Hi Guys, I have a file like this: aaa b c d e f fsss g h i k l qqq r t h n I want: aaa b c d e f fsss g h i k l qqq r t h , n ggg p t e d u qqq i o s , k (2 Replies)
Discussion started by: npatwardhan
2 Replies

2. Shell Programming and Scripting

AWK Print Line If Specific Character Is Matched

Hello, I have a file as such: FFFFFFF6C000000 225280 225240 - - rwxs- FFFFFFFF79C00000 3240 3240 - - rwxs- FFFFFFFF7A000000 4096 4096 - - rwxs- FFFFFFFF7A400000 64 64 ... (3 Replies)
Discussion started by: PointyWombat
3 Replies

3. Shell Programming and Scripting

Replace specific field on specific line sed or awk

I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work. Brief overview: I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies

4. Shell Programming and Scripting

Print Specific lines when found specific character

Hello all, I have thousand file input like this: file1: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$ | | | |$$ $$ UERT | TTYH | TAFE | FRFG |$$ $$______|______|________|______|$$ $$ | | | |$$ $$ 1 | DISK | TR1311 | 1 |$$ $$ 1 |... (4 Replies)
Discussion started by: attila
4 Replies

5. Shell Programming and Scripting

Match columns and print specific field

Hello, I have data in following format. ... (6 Replies)
Discussion started by: Pushpraj
6 Replies

6. Shell Programming and Scripting

awk - how to print specific field if a string is matched

hi gurus, I would like to be able to use awk to process 1 file as such: abc 1 2 3 4 5 6 7 8 9 10 flags 1 2 4 flags 1 2 5 abc 2 3 4 5 6 7 8 9 10 11 flags 1 2 3 abc 4 5 6 7 8 9 6 7 78 89 flags 1 2 3 flags 1 2 4 flags 1 2 3 4 I would like to be able to print field 1 and 5 when the... (4 Replies)
Discussion started by: revaroo
4 Replies

7. Shell Programming and Scripting

File Parsing based on a character in a specific field

Hi All, I'm having a hard time finding a starting point for my issue. I have a 30k line file (fspsec.txt) that I would like to parse into smaller files based on any character existing in field 1. ACCOUNTANT LEVEL 1 (ACCT.ACCOUNTANT) OPERATORS: DOEJO (418) TOOLS: Branch Maintenance ... (2 Replies)
Discussion started by: aahlrich
2 Replies

8. Shell Programming and Scripting

Print specific field when condition met

Hi All, Seeking for your assistance to print all the specific field when the condition met. Ex: file1.txt 1|203|3|31243|5341|6452|623|22|00|01 3|45345|123214|6534|3423|6565|643|343|232|10 if field 1 = 1 and field 3 = 3 and field 5 = 5341 and field 6 = 6452 it will print from $1 to $10.... (2 Replies)
Discussion started by: znesotomayor
2 Replies

9. Shell Programming and Scripting

awk to combine all matching fields in input but only print line with largest value in specific field

In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited, that are in $1 of gene which is just a single column of text. However only the line with the greatest $9 value in input needs to be printed. So in the example below all the MECP2 and LTBP1... (0 Replies)
Discussion started by: cmccabe
0 Replies

10. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies
XvGrabPort(3)							  libXv Functions						     XvGrabPort(3)

NAME
XvGrabPort - lock port for exclusive use by client SYNOPSIS
#include <X11/extensions/Xvlib.h> int XvGrabPort(Display *dpy, XvPortID port, Time time); ARGUMENTS
dpy Specifies the connection to the X server. port Defines the port to be grabbed. time Specifies the request timestamp. DESCRIPTION
XvGrabPort(3) grabs a port. Once a client grabs a port, only that client can make video requests to that port. If the time is before the current port time, the XvGrabPort request is ignored and XvInvalidTime is returned. If the port is already grabbed by another client, XvAlreadyGrabbed is returned. Otherwise it returns a status of Success. The port time is updated when the fol- lowing requests are processed: XvGrabPort(3), XvUngrabPort(3), XvPutVideo(3), XvPutStill(3), XvGetVideo(3), XvGetStill(3). If the port is actively processing video for another client, the video is preempted, and an XvVideoNotify event with detail XvPreempted is generated for its drawable. RETURN VALUES
[Success] Returned if XvGrabPort(3) completed successfully. [XvInvalidTime] Returned if requested time is older than the current port time. [XvAlreadyGrabbed] Returned if the port is already grabbed by another client. [XvBadExtension] Returned if the Xv extension is unavailable. [XvBadAlloc] Returned if XvGrabPort(3) failed to allocate memory to process the request. DIAGNOSTICS
[XvBadPort] Generated if the requested port does not exist. SEE ALSO
XvUngrabPort(3), XvVideoNotify(3) X Version 11 libXv 1.0.7 XvGrabPort(3)
All times are GMT -4. The time now is 12:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy