Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to grep from specific field Post 302217798 by tiff-matt on Wednesday 23rd of July 2008 02:51:33 PM
Old 07-23-2008
MySQL Thank you muck

Thanks a lot for the prompt reply, i'll try the command
 

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
sttime(3)						    ShapeTools Toolkit Library							 sttime(3)

NAME
stMktime, stWriteTime - date and time handling SYNOPSIS
#include <config.h> #include <sttk.h.h> time_tstMktime (char *string); char*stWriteTime (time_t date); DESCRIPTION
stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is a list of all valid formats, optional parts in brackets. [Tue] Jan 5[,] [19]93 This includes the standard asctime(3) format. Jan 5 With no year given, the year defaults to the current year. [19]93/01/05 This notation requires month and day represented by exactly two digits. 5.1.[19]93 This is the usual German notation. 5.1. German notation referencing the current year. A certain time, given together with the date must always have the following form. hours:minutes[:seconds] Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below 10 may be written as one digit numbers. The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of white- space may be given between a field of the time value and the separating colon. The time is always considered to be local time. stWriteTime generates a time string similar to asctime(3) from its date argument. SEE ALSO
asctime(3) BUGS
Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure. sttk-1.7 Thu Jun 24 17:43:35 1993 sttime(3)
All times are GMT -4. The time now is 06:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy