Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to grep from specific field Post 302217793 by matrixmadhan on Wednesday 23rd of July 2008 02:43:53 PM
Old 07-23-2008
Welcome to the forums ! Smilie

You could have searched the forums for 'n' number of answers.

Code:
awk '$2 ~ 2002' filename

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Grep for NULL for a specific field in a unix file

hii.. I have a pipe delimited file For ex: TEST_1-8J6TZN|ASLANK|BHR-09||TRAM I want to grep for NULL in the 4th field only from the above file Please suggest Also let me know if there is any limitation in the suggested command Thanks all in advance..!! (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

2. Shell Programming and Scripting

Removing parts of a specific field

All, I have a field in a comma seperated file with hundreds of lines and about 20 columns and I wish to remove all numbers after the decimal point in field 4 on each line and output the rest to another file or write it back to itself. File is like this 20070126, 123.0, GBP, 1234.5678,... (9 Replies)
Discussion started by: kieranh
9 Replies

3. Shell Programming and Scripting

Help with grep at specific field of a file

hi, I would like to search for a specific string at a specific line in a file and would like to know the count of it. eg: samp.txt ABC 1234 BELL HNZ 4567 RING NNN 5673 BELL Please help with the command to find the count of BELL in the above file samp.txt at the specific line 10 with... (7 Replies)
Discussion started by: techmoris
7 Replies

4. Shell Programming and Scripting

Using awk to read a specific line and a specific field on that line.

Say the input was as follows: Brat 20 x 1000 32rf Pour 15 p 1621 05pr Dart 10 z 1111 22xx My program prompts for an input, what I want is to use the input to locate a specific field. Like if I type in, "Pou" then it would return "Pour" and just "Pour" I currently have this line but it is... (6 Replies)
Discussion started by: Bungkai
6 Replies

5. 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

6. Shell Programming and Scripting

Get last field specific record

i have file A as below contents --------------------------- Use descriptive thread titles when posting. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". For example, do not post questions For example, do not deliminated. output file as below:... (2 Replies)
Discussion started by: ANSHUMAN1983
2 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. Shell Programming and Scripting

Add value in specific field

Gents, I have many files to change increasing 40000 in specific field. Can you help me with a command with sed or awk to fix this problem. Where the the field has Marker FDU. I need to add 40000 plus example Marker FDU 27152.00 Marker FDU 67152.00 I should... (4 Replies)
Discussion started by: jiam912
4 Replies

9. Shell Programming and Scripting

Extract Specific Information from a particular field

Hi, I am trying to extract a specific information from a file which contains more than 200 million records. Attached the input file for your reference. My file contains information below ... (4 Replies)
Discussion started by: rramkrishnas
4 Replies

10. Shell Programming and Scripting

Find the difference in specific field

Hi All, Seeking for your assistance to get the difference of field1 and field2 and output all the records if there's a difference. please see below scenario. file1.txt 250|UPTREND FASHION DESIGN,CORP.|2016-04-04 09:36:13.991257 74|MAINSTREAM BUSINESS INC.|2016-04-04 09:36:13.991257... (1 Reply)
Discussion started by: znesotomayor
1 Replies
IRSEND(1)								FSF								 IRSEND(1)

NAME
irsend - basic LIRC program to send infra-red commands SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...] DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such as TV boxes, HiFi sets, etc. DIRECTIVE can be: SEND_ONCE - send CODE [CODE ...] once SEND_START - start repeating CODE SEND_STOP - stop repeating CODE LIST - list configured remote items SET_TRANSMITTERS - set transmitters NUM [NUM ...] SIMULATE - simulate IR event REMOTE is the name of a remote, as described in the lircd configuration file. CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file. NUM is the transmitter number of the hardware device. For the LIST DIRECTIVE, REMOTE and/or CODE can be empty: LIST "" "" - list all configured remote names LIST REMOTE "" - list all codes of REMOTE LIST REMOTE CODE - list only CODE of REMOTE The SIMULATE command only works if it has been explicitly enabled in lircd. -h --help display usage summary -v --version display version -d --device use given lircd socket [/var/run/lirc/lircd] -a --address=host[:port] connect to lircd at this address -# --count=n send command n times EXAMPLES
irsend LIST DenonTuner "" irsend SEND_ONCE DenonTuner PROG-SCAN irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3 irsend SEND_STOP OnkyoAmpli VOL-DOWN irsend SET_TRANSMITTERS 1 irsend SET_TRANSMITTERS 1 3 4 irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S" FILES
/etc/lirc/lircd.conf Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave- form details. DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics: "irsend: could not connect to socket" "irsend: Connection refused" (or "Permission denied"). SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org. irsend 0.8.7pre1 May 2010 IRSEND(1)
All times are GMT -4. The time now is 03:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy