Sponsored Content
Top Forums Shell Programming and Scripting Redirecting lines containing specific value at second field Post 302890267 by ezee on Wednesday 26th of February 2014 04:14:02 AM
Old 02-26-2014
Code:
DPSDMX10   DPSDMX10_T DMX_DP     COMPLETED             01/31/2014 202626 01/31/2014 202630                           node SYS_BATCH                       9027   100 0064506 0404544 01/31/2014 user       000  000  00  0362074

here I want only those line to be redirected which has DMX substr in second field

---------- Post updated at 02:44 PM ---------- Previous update was at 02:41 PM ----------

Quote:
Originally Posted by SriniShoo
Code:
grep "str" input.txt > output.txt

this will also redirect lines which contain DMX in other fields
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirecting my output to a specific file

Hi guys am doing some checking inside my script and i want to redirect my output to a specific file for example checking if a move was successfully done and was writing on the screen whether the move was successful or not and now want to write same thing into a file... I am new to shell... (2 Replies)
Discussion started by: Lutchumaya
2 Replies

2. UNIX for Dummies Questions & Answers

redirecting with lines number

Is there a command for this? (1 Reply)
Discussion started by: JamieMurry
1 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

Combine multiple lines in file based on specific field

Hi, I have an issue to combine multiple lines of a file. I have records as below. Fields are delimited by TAB. Each lines are ending with a new line char (\n) Input -------- ABC 123456 abcde 987 890456 7890 xyz ght gtuv ABC 5tyin 1234 789 ghty kuio ABC ghty jind 1234 678 ght ... (8 Replies)
Discussion started by: ratheesh2011
8 Replies

6. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

7. Shell Programming and Scripting

How to print with awk specific field different from specific character?

Hello, i need help with awk. I have this file: cat number DirB port 67 er_enc_out 0 er_bad_os 0 DirB port 71 er_enc_out 56 er_bad_os 0 DirB port 74 er_enc_out 0 er_bad_os 0 DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies

8. UNIX for Dummies Questions & Answers

Printing lines with specific strings at specific columns

Hi I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Discussion started by: a_bahreini
3 Replies

9. Shell Programming and Scripting

awk repeat one field at all lines and modify field repetitions

Hello experts I have a file with paragraphs begining with a keeping date and ending with "END": 20120301 num num John num num A keepnum1 num num kathrin num num A keepnum1 num num kathrin num num B keepnum2 num num Pete num num A keepnum1 num num Jacob num... (2 Replies)
Discussion started by: phaethon
2 Replies

10. Shell Programming and Scripting

awk to remove lines in file if specific field matches

I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :). grep grep -v -F -f targets.bed sort_list grep -vFf sort_list targets awk awk -F, ' > FILENAME == ARGV {to_remove=1; next} > ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
DMX(3X) 																   DMX(3X)

NAME
DMX - X Window System DMX (Distributed Multihead X) extension DESCRIPTION
The DMX extension provides support for communication with and control of Xdmx(1) server. Attributes of the Xdmx(1) server and of the back- end screens attached to the server can be queried and modified via this protocol. SUMMARY OF LIBRARY FUNCTIONS
The following is a summary of DMX library functions: DMXQueryExtension(3X) - determine if DMX is available DMXQueryVersion(3X) - determine DMX extension version DMXSync(3X) - flush protocol requests between Xdmx(1) and back-end X servers DMXForceWindowCreation(3X) - force immediate back-end window creation DMXGetScreenCount(3X) - determine number of back-end screens DMXGetScreenAttributes(3X) - determine back-end screen attributes DMXChangeScreensAttributes(3X) - change back-end screen attributes DMXAddScreen(3X) - attach a new back-end screen DMXRemoveScreen(3X) - detach a back-end screen DMXGetWindowAttributes(3X) - determine back-end window attributes DMXGetDesktopAttributes(3X) - determine global bounding box DMXChangeDesktopAttributes(3X) - change global bounding box DMXGetInputCount(3X) - determine number of input devices DMXGetInputAttributes(3X) - determine input device attributes DMXAddInput(3X) - attach a new backend or console input DMXRemoveInput(3X) - detach an input DMXAddBackendInput(3X) - attach a new back-end input DMXAddConsoleInput(3X) - attach a new console input Each of these functions is described in its own man page. SEE ALSO
Xdmx(1), xdmxconfig(1), vdltodmx(1) XFree86 Version 4.7.0 DMX(3X)
All times are GMT -4. The time now is 08:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy