Sponsored Content
Top Forums Shell Programming and Scripting String search and return value from column Post 302157737 by jaydeep_sadaria on Saturday 12th of January 2008 01:37:53 AM
Old 01-12-2008
String search and return value from column

Dear All

I had below mention file as my input file.

87980457 Jan 12 2008 2:00AM 1 60 BSC1
81164713 Jan 12 2008 3:00AM 1 60 BSC2
78084521 Jan 12 2008 4:00AM 1 60 BSC3
68385193 Jan 12 2008 5:00AM 1 60 BSC4
85883305 Jan 12 2008 6:00AM 1 60 BSC5
75069865 Jan 12 2008 7:00AM 1 60 BSC6

Now i want to search BSC4 word in that file and if it match in file then i want to take its date from same file mention in left side.

I.E. If BSC4 match then it should returen Jan 12 2008 5:00AM from same file.

Sugest me possible way.

Regards
jaydeep
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search for string dublicates in column

Hi I have a file with one column. There are a few replicas in this column, that is some lines look exactly the same. I want to know the ones that occur twice. Inputfile.xml "AAH.dbEUR" "ECT.dbEUR" "AEGN.dbEUR" "AAH.dbEUR" "AKZO.dbEUR" ... Here I would like to be informed that... (7 Replies)
Discussion started by: lulle
7 Replies

2. Shell Programming and Scripting

Search string and return only the 5th line

I have looked at almost every posting on here regarding, grep, sed, awk, nawk, perl methods to perform this function, but they are just not returning the results I hope to see. Example File: abcdef 123456 ghijkl 7890123 7890123 7890123 7890123 mnopqrs 456789 This is the most... (4 Replies)
Discussion started by: doza22
4 Replies

3. Shell Programming and Scripting

Search in a column by a string

Hi All, My file looks like : hsdhj dsajhf jshdfajkh jksdhfj jkdhsfj shfjhd shdf hdsfjkh jsdfhj hdshf sdjh dhs foot dsjhfj jdshf dasfh jdsh dsjfh jdfshj david Now, I want to search entire column by a string... (10 Replies)
Discussion started by: naw_deepak
10 Replies

4. UNIX for Dummies Questions & Answers

Search for string and return lines above and below

Hi, I have a file with the following contents: COMPANY ABCD TRUCKER JOE SMITH TRUCK 456 PLATE A12345678 TRUCKER BILL JONES TRUCK 789 PLATE B7894561 I need to create a script or search command that will search for this string '789' in the file. This string is unique and only... (7 Replies)
Discussion started by: doza22
7 Replies

5. UNIX for Dummies Questions & Answers

search for string and return substring

Hi, I have a file with the following contents: I need to create a script or search command that will search for this string 'ENDC' in the file. This string is unique and only occurs in one record. Once it finds the string, I would like it to return positions 101-109 ( this is the date of... (0 Replies)
Discussion started by: Lenora2009
0 Replies

6. Shell Programming and Scripting

How to search for string and return binary result?

Hi, I have a problem that I am sure someone will know the answer to. Currently I have a script which returns a binary output if it finds a certain search string (in this case relating to a DRBD cluster) as follows: searchstring="cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate" && echo... (3 Replies)
Discussion started by: almightybunghol
3 Replies

7. Shell Programming and Scripting

search a string in a particular column of file and return the line number of the line

Hi All, Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example : abc.txt 7000,john,2,1,0,1,6 7001,elen,2,2,0,1,7 7002,sami,2,3,0,1,6 7003,mike,1,4,0,2,1 8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies

8. Shell Programming and Scripting

bash: need to have egrep to return a text string if the search pattern has NOT been found

Hello all, after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help. I need to resolve a grep / sed / xargs / awk problem. My input file is just like this: ----------------------------------... (6 Replies)
Discussion started by: bash4ever
6 Replies

9. UNIX for Advanced & Expert Users

Recursively search the string from a column in no. of files

i have a file named keyword.csv(contains around 8k records) which contains a no. of columns. The 5th column contains all the keywords. I want to recursively search these keywords in all .pl files(around 1k) and display the filename....Afterthat i will use the filename and some of the column from... (3 Replies)
Discussion started by: millan
3 Replies

10. Shell Programming and Scripting

Search a column a return a set of words

Hi I have two files. One is a text file consisting of sentences i.e. INPUT.txt and the second file is SEARCH.txt consisting of two or three columns. I need help to write a script to search the second column of SEARCH.txt for each set of five words (blue color as set one and green color as set... (6 Replies)
Discussion started by: my_Perl
6 Replies
DateTime::Locale::xh_ZA(3)				User Contributed Perl Documentation				DateTime::Locale::xh_ZA(3)

NAME
DateTime::Locale::xh_ZA SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'xh_ZA' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Xhosa South Africa. DATA
This locale inherits from the DateTime::Locale::xh locale. It contains the following data. Days Wide (format) Mvulo Lwesibini Lwesithathu Lwesine Lwesihlanu Mgqibelo Cawe Abbreviated (format) Mvu Bin Tha Sin Hla Mgq Caw Narrow (format) Mvu Bin Tha Sin Hla Mgq Caw Wide (stand-alone) Mvulo Lwesibini Lwesithathu Lwesine Lwesihlanu Mgqibelo Cawe Abbreviated (stand-alone) Mvu Bin Tha Sin Hla Mgq Caw Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) Janyuwari Februwari Matshi Epreli Meyi Juni Julayi Agasti Septemba Okthoba Novemba Disemba Abbreviated (format) Jan Feb Mat Epr Mey Jun Jul Aga Sep Okt Nov Dis Narrow (format) Jan Feb Mat Epr Mey Jun Jul Aga Sep Okt Nov Dis Wide (stand-alone) Janyuwari Februwari Matshi Epreli Meyi Juni Julayi Agasti Septemba Okthoba Novemba Disemba Abbreviated (stand-alone) Jan Feb Mat Epr Mey Jun Jul Aga Sep Okt Nov Dis Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) 1 unyangantathu 2 unyangantathu 3 unyangantathu 4 unyangantathu Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1 unyangantathu 2 unyangantathu 3 unyangantathu 4 unyangantathu Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BC umnyaka wokuzalwa kukaYesu Abbreviated BC AD Narrow BC AD Date Formats Full 2008-02-05T18:30:30 = Lwesibini, 2008 Februwari 05 1995-12-22T09:05:02 = Lwesihlanu, 1995 Disemba 22 -0010-09-15T04:44:23 = Mgqibelo, -10 Septemba 15 Long 2008-02-05T18:30:30 = 2008 Februwari 5 1995-12-22T09:05:02 = 1995 Disemba 22 -0010-09-15T04:44:23 = -10 Septemba 15 Medium 2008-02-05T18:30:30 = 2008 Feb 5 1995-12-22T09:05:02 = 1995 Dis 22 -0010-09-15T04:44:23 = -10 Sep 15 Short 2008-02-05T18:30:30 = 2008-02-05 1995-12-22T09:05:02 = 1995-12-22 -0010-09-15T04:44:23 = -010-09-15 Default 2008-02-05T18:30:30 = 2008 Feb 5 1995-12-22T09:05:02 = 1995 Dis 22 -0010-09-15T04:44:23 = -10 Sep 15 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = Lwesibini, 2008 Februwari 05 18:30:30 UTC 1995-12-22T09:05:02 = Lwesihlanu, 1995 Disemba 22 09:05:02 UTC -0010-09-15T04:44:23 = Mgqibelo, -10 Septemba 15 04:44:23 UTC Long 2008-02-05T18:30:30 = 2008 Februwari 5 18:30:30 UTC 1995-12-22T09:05:02 = 1995 Disemba 22 09:05:02 UTC -0010-09-15T04:44:23 = -10 Septemba 15 04:44:23 UTC Medium 2008-02-05T18:30:30 = 2008 Feb 5 18:30:30 1995-12-22T09:05:02 = 1995 Dis 22 09:05:02 -0010-09-15T04:44:23 = -10 Sep 15 04:44:23 Short 2008-02-05T18:30:30 = 2008-02-05 18:30 1995-12-22T09:05:02 = 1995-12-22 09:05 -0010-09-15T04:44:23 = -010-09-15 04:44 Default 2008-02-05T18:30:30 = 2008 Feb 5 18:30:30 1995-12-22T09:05:02 = 1995 Dis 22 09:05:02 -0010-09-15T04:44:23 = -10 Sep 15 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 Bin 1995-12-22T09:05:02 = 22 Hla -0010-09-15T04:44:23 = 15 Mgq Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = Bin, 2-5 1995-12-22T09:05:02 = Hla, 12-22 -0010-09-15T04:44:23 = Mgq, 9-15 MMM (LLL) 2008-02-05T18:30:30 = Feb 1995-12-22T09:05:02 = Dis -0010-09-15T04:44:23 = Sep MMMd (MMM d) 2008-02-05T18:30:30 = Feb 5 1995-12-22T09:05:02 = Dis 22 -0010-09-15T04:44:23 = Sep 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Bin Feb 5 1995-12-22T09:05:02 = Hla Dis 22 -0010-09-15T04:44:23 = Mgq Sep 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = Februwari 5 1995-12-22T09:05:02 = Disemba 22 -0010-09-15T04:44:23 = Septemba 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Bin Februwari 5 1995-12-22T09:05:02 = Hla Disemba 22 -0010-09-15T04:44:23 = Mgq Septemba 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = Bin, 2008-2-5 1995-12-22T09:05:02 = Hla, 1995-12-22 -0010-09-15T04:44:23 = Mgq, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Feb 1995-12-22T09:05:02 = 1995 Dis -0010-09-15T04:44:23 = -10 Sep yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Bin, 2008 Feb 5 1995-12-22T09:05:02 = Hla, 1995 Dis 22 -0010-09-15T04:44:23 = Mgq, -10 Sep 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Februwari 1995-12-22T09:05:02 = 1995 Disemba -0010-09-15T04:44:23 = -10 Septemba yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 Miscellaneous Prefers 24 hour time? Yes Local first day of the week Mvulo SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.3 2014-06-10 DateTime::Locale::xh_ZA(3)
All times are GMT -4. The time now is 12:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy