Sponsored Content
Full Discussion: Search value in text file
Top Forums Shell Programming and Scripting Search value in text file Post 302542683 by yoavbe on Thursday 28th of July 2011 10:20:04 AM
Old 07-28-2011
Search value in text file

Hi,
I have the follwoing text file :
Code:
db1;unrecoverable;0;20110728162548
db1;unrefreshed;1,NO_MV_VIEWS;20110728162548
xe1;Database;1;20110728162548
xe1;autoextensible;0;20110511112053
xe1;chk_offline_dbf;0;20110511112053
xe1;expiry_date;0;20110511112053
xe1;job;4;20110420111823
xe1;Database;0;20110728162548
xe1;connected_session_pct;9.39;20110728162548
xe1;created;18-FEB-08;20110728162548

The last column in each row have a some date value.
I need to find the row with the oldest date .
I this case :
Code:
xe1;job_q_processes;4;20110420111823

Thanks

Last edited by Franklin52; 07-28-2011 at 11:21 AM.. Reason: Please use code tags for data and code samples, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search file contain some text

I am loging as root right now. I like to search and find the file that contain the text of "NBC 10.5" Both string and number. I know I need to use grep, but how do I use it??? Oh, yeah if I do, grep 'NBC' * then it gives me error grep: can't open usage i thought root can open... (5 Replies)
Discussion started by: yuimyt
5 Replies

2. UNIX for Dummies Questions & Answers

search and replace a specific text in text file?

I have a text file with following content (3 lines) filename : output.txt first line:12/12/2008 second line:12/12/2008 third line:Y I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before. I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies

3. Shell Programming and Scripting

Search for a text in a file

How can i get all the output that i wanted see example below. ex: Wed Nov 9 11111111111111 22222222222222 33333333333333 Thu Nov 10 aaaaaaaaaaaa bbbbbbbbbbbbbb ccccccccccccccc Wed Nov 9 44444444444 55555555555 aaaaaaaaaaa (13 Replies)
Discussion started by: kenshinhimura
13 Replies

4. Shell Programming and Scripting

Search text from a file and print text and one previous line too

Hi, Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11 Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
6 Replies

5. Shell Programming and Scripting

How to Search for text in a file

I need to search for a record in a file and spit out the first record. The file however is csv and is laid out like this: 20984498494 J SMITH MISS SMITH ADDRESSSXXXXXX 30000000000 0000000000000 000000000000000 0000000000 402XXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXX 50XXXXXX ... (12 Replies)
Discussion started by: Pablo_beezo
12 Replies

6. Shell Programming and Scripting

How do I search on a text file?

Hi, I'm new to shell programming and I have a text file with data with looks like this: chocolate:toblerone swiss:23:100:20 chocolate:ferro rocher:30:90:80 gummi bear:gummi co:5:20:12 . It is basically a file which stores food. The 1st field is the type of food, 2nd... (4 Replies)
Discussion started by: mofako
4 Replies

7. Shell Programming and Scripting

search text file in file if this file contains necessary text (awk,grep)

Hello friends! Help me pls to write correct awk and grep statements for my task: I have got files with name filename.txt It has such structure: Start of file FROM: address@domen.com (12...890) abc DATE: 11/23/2009 on Std SUBJECT: any subject End of file So, I must check, if this file... (4 Replies)
Discussion started by: candyme
4 Replies

8. Shell Programming and Scripting

Search text file

awk -F "" ' $2 ~ /<Clinical features:>|<Clinical features:>|<Inheritance pattern:>|<Inheritance pattern:>/{print $2, $3}' OFS='\t' genedx156.txt > output.txt The above command seems to run but no results are in the output. Basically, I am just searching for those key words and output the... (5 Replies)
Discussion started by: cmccabe
5 Replies

9. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

10. Shell Programming and Scripting

Search a text and return the text from file

Hi I have a set of input strings in a pattern as given below string1 string2 string3 string4 string5 I need to search this sequence of strings from a file in such a way that the first two strings (string1 and string2) and last two strings (string4 and string5) should match with the... (8 Replies)
Discussion started by: my_Perl
8 Replies
.::SWF::TextField(3pm)					User Contributed Perl Documentation				    .::SWF::TextField(3pm)

NAME
SWF::TextField - SWF TextField class SYNOPSIS
use SWF::TextField; $textfield = new SWF::TextField([$flags]); DESCRIPTION
Unlike SWF::Text objects, TextFields cannot be rotated, scaled non-proportionally, or skewed. However, TextFields can be used as form entries and they can use browser-defined fonts. NOTES
: TextField is implemented into Flash since Flash3. Most of features for TextFields are available since Flash4. Simple HTML-tags in TextField are possible since Flash5. METHODS
new SWF::TextField([$flags]); Creates a TextField object whose behaviour is dictated by "flags" (see also SWF::Constants): SWFTEXTFIELD_NOEDIT: Non-editable Textfiled SWFTEXTFIELD_PASSWORD: Obscure user input with astricts. SWFTEXTFIELD_DRAWBOX: Draw a border around TextField SWFTEXTFIELD_MULTILINE: TextFiels may contain multiple lines SWFTEXTFIELD_WORDWRAP: Warp text when text reaches TextField border SWFTEXTFIELD_NOSELECT: TextField is not selected when user clicks on it SWFTEXTFIELD_ALIGN_LEFT: Align text to the left SWFTEXTFIELD_ALIGN_RIGHT: Align text to the right SWFTEXTFIELD_ALIGN_CENTER: Align text to the center SWFTEXTFIELD_ALIGN_JUSTIFY: Justify text SWFTEXTFIELD_HTML: Add HTML markup string SWFTEXTFIELD_HASLENGTH: SWFTEXTFIELD_USEFONT: Want to embed font SWFTEXTFIELD_AUTOSIZE: Flags may be combined with the bitwise OR operation. For example: my $t = new SWF::TextField(SWFTEXTFIELD_MULTILINE | SWFTEXTFIELD_WORDWRAP); $textfield->addString($string) $textfield->addUTF8String($UTF8string) Add $string to TextField. Text is appended to the existing text. $textfield->align($alignment) $textfield->setAlignment($alignment) Set the alignment of the text in the textfield. Possible values are SWFTEXTFIELD_ALIGN_LEFT SWFTEXTFIELD_ALIGN_RIGHT SWFTEXTFIELD_ALIGN_CENTER SWFTEXTFIELD_ALIGN_JUSTIFY By default a SWF::TextField ist left aligned. $textfield->setBounds($width, $height) Sets the width and height of the textfield. $textfield->setColor($red, $green, $blue [, $alpha]) Set the color of the text. An 8 bit value for each parameter. You can use the hex or decimal notation. Even mixed. $tf->setColor(0xcc,0,0x33); $tf->setColor(204,0,51,255); $textfield->setFont($font) Sets an SWF::Font object -$font- to be used in the TextField. $textfield->setPadding($padding) Set TextField padding. $textfield->setHeight($height) Set the height of font in your textfield. $textfield->setIndentation($indentation) Set the indentation of the first line of a paragraph. $textfield->setLeftMargin($left) Sets the left margin of the textfield. $textfield->setRightMargin($right) Sets the right margin of the textfield. $textfield->setMargins($left, $right) Sets left and right margins of $textfield. $textfield->setLineSpacing($linespacing) Sets the space between lines. $textfield->setName($name) $textfield->setVariableName($name) Assigns a name to the TextField which could be used to reference the TextField within ActionScript. $textfield->addChars($string) $textfield->addUTF8Chars($UTF8string) Adds characters to a font that will be available within a textfield. $textfield->setFlags($flags) Set TextField behaviour by "flags" (see above new SWF::TextField) For example: $textfield->setFlags(SWFTEXTFIELD_PASSWORD); $textfield->setLength($length) Sets limit for user input size to $length. $textfield->setFieldHeight($height) Sets height limit for visible part of text field. If $height is set to 0, the height is calculated by used font, see setHeight() method. AUTHOR
Soheil Seyfaie (soheil at users.sourceforge.net). SEE ALSO
SWF, SWF::Action, SWF::Button, SWF::Constants, SWF::DisplayItem, SWF::Font, SWF::Movie, SWF::MovieCip, SWF::Text perl v5.14.2 2011-10-26 .::SWF::TextField(3pm)
All times are GMT -4. The time now is 05:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy