Sponsored Content
Top Forums Shell Programming and Scripting Extract pattern from text line Post 302246726 by vampirodolce on Tuesday 14th of October 2008 08:24:54 AM
Old 10-14-2008
Thank you. The second command seems to work but not for all the instances. For example, the last lines in the source file are:

Code:
VVE.MI VIAGGI DEL VENTAGLIO 0,2500 13 ott Up 0,0088
XPR.MI EXPRIVIA 0,7653 13 ott Up 0,1210
ZUC.MI ZUCCHI SPA 1,4010 13 ott Up 0,0010
ZUCR.MI ZUCCHI SPA RISP NC 2,5000 6 ott 0,0000
ZV.MI ZIGNAGO VETRO 3,6500 13 ott Up 0,0100

and the output of the command is:

Code:
VVE.MI 13
XPR.MI 13
ZUC.MI 1,4010
ZUCR.MI 2,5000
ZV.MI 3,6500

So in the first 2 cases the output is the day of the month (13) and not the price (0,2500 or 0,7653).

Last edited by vampirodolce; 10-14-2008 at 09:33 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk: need to extract a line before a pattern

Hello , I need your help to extract a line in a big file , and this line is always 11 lines before a specific pattern . Do you know a way via Awk ? Thanks in advance npn35 (17 Replies)
Discussion started by: npn35
17 Replies

2. Shell Programming and Scripting

Extract pattern from text line

Hi, the text line looks like this: "test1" " " "test2" "test3" "test4" "10" "test 10 12" "00:05:58" "filename.bin" "3.3MB" "/dir/name" "18459" what's the best way to select any of it? So I can for example get only the time or size and so on. I was trying awk -F""" '{print $N}' but... (3 Replies)
Discussion started by: TehOne
3 Replies

3. Shell Programming and Scripting

Extract pattern from text line

The text line has the following formats: what.ever.bla.bla.C01G06.BLA.BLA2 what.ever.bla.bla.C11G33.BLA.BLA2 what.ever.bla.bla.01x03.BLA.BLA2 what.ever.bla.bla.03x05.BLA.BLA2 what.ever.bla.bla.Part01.BLA.BLA2 and other similar ones, I need a way to select the "what.ever.bla.bla" part out... (4 Replies)
Discussion started by: TehOne
4 Replies

4. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

5. Shell Programming and Scripting

extract unique pattern from large text file

Hi All, I am trying to extract data from a large text file , I want to extract lines which contains a five digit number followed by a hyphen , like 12345- , i tried with egrep ,eg : egrep "+" text.txt but which returns all the lines which contains any number of digits followed by hyhen ,... (19 Replies)
Discussion started by: shijujoe
19 Replies

6. Shell Programming and Scripting

get the fifth line of a text file into a shell script and trim the line to extract a WORD

FOLKS , i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one. thanks... Venu (3 Replies)
Discussion started by: venu
3 Replies

7. Shell Programming and Scripting

Search for a pattern,extract value(s) from next line, extract lines having those extracted value(s)

I have hundreds of files to process. In each file I need to look for a pattern then extract value(s) from next line and then search for value(s) selected from point (2) in the same file at a specific position. HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

8. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

9. Shell Programming and Scripting

Extract all the sentences from a text file that matches a pattern list

Hi I have a big text file. I want to extract all the sentences that matches at least 70% (seventy percent) of the words from each sentence based on a word list called A. Say the format of the text file is as given below: This is the first sentence which consists of fifteen words... (4 Replies)
Discussion started by: my_Perl
4 Replies

10. Shell Programming and Scripting

Extract pattern from text

Hi all, I got a txt here and I need to extract all D 8888 44 and D 8888 43 + next field =",g("en")];f._sn&&(f._sn= "og."+f._sn);for(var n in f)l.push("&"),l.push(g(n)),l.push("="),l.push(g(f));l.push("&emsg=");l.push(g(d.name+":"+d.message));var m=l.join("");Ea(m)&&(m=m.substr(0,2E3));c=m;var... (5 Replies)
Discussion started by: stinkefisch
5 Replies
DateTime::Locale::it_IT(3)				User Contributed Perl Documentation				DateTime::Locale::it_IT(3)

NAME
DateTime::Locale::it_IT SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'it_IT' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Italian Italy. DATA
This locale inherits from the DateTime::Locale::it locale. It contains the following data. Days Wide (format) lunedi martedi mercoledi giovedi venerdi sabato domenica Abbreviated (format) lun mar mer gio ven sab dom Narrow (format) L M M G V S D Wide (stand-alone) Lunedi Martedi Mercoledi Giovedi Venerdi Sabato Domenica Abbreviated (stand-alone) lun mar mer gio ven sab dom Narrow (stand-alone) L M M G V S D Months Wide (format) gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre Abbreviated (format) gen feb mar apr mag giu lug ago set ott nov dic Narrow (format) G F M A M G L A S O N D Wide (stand-alone) Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre Abbreviated (stand-alone) gen feb mar apr mag giu lug ago set ott nov dic Narrow (stand-alone) G F M A M G L A S O N D Quarters Wide (format) 1o trimestre 2o trimestre 3o trimestre 4o trimestre Abbreviated (format) T1 T2 T3 T4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1o trimestre 2o trimestre 3o trimestre 4o trimestre Abbreviated (stand-alone) T1 T2 T3 T4 Narrow (stand-alone) 1 2 3 4 Eras Wide a.C. d.C Abbreviated aC dC Narrow aC dC Date Formats Full 2008-02-05T18:30:30 = martedi 5 febbraio 2008 1995-12-22T09:05:02 = venerdi 22 dicembre 1995 -0010-09-15T04:44:23 = sabato 15 settembre -10 Long 2008-02-05T18:30:30 = 05 febbraio 2008 1995-12-22T09:05:02 = 22 dicembre 1995 -0010-09-15T04:44:23 = 15 settembre -10 Medium 2008-02-05T18:30:30 = 05/feb/2008 1995-12-22T09:05:02 = 22/dic/1995 -0010-09-15T04:44:23 = 15/set/-10 Short 2008-02-05T18:30:30 = 05/02/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/09/-10 Default 2008-02-05T18:30:30 = 05/feb/2008 1995-12-22T09:05:02 = 22/dic/1995 -0010-09-15T04:44:23 = 15/set/-10 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 = martedi 5 febbraio 2008 18.30.30 UTC 1995-12-22T09:05:02 = venerdi 22 dicembre 1995 09.05.02 UTC -0010-09-15T04:44:23 = sabato 15 settembre -10 04.44.23 UTC Long 2008-02-05T18:30:30 = 05 febbraio 2008 18.30.30 UTC 1995-12-22T09:05:02 = 22 dicembre 1995 09.05.02 UTC -0010-09-15T04:44:23 = 15 settembre -10 04.44.23 UTC Medium 2008-02-05T18:30:30 = 05/feb/2008 18.30.30 1995-12-22T09:05:02 = 22/dic/1995 09.05.02 -0010-09-15T04:44:23 = 15/set/-10 04.44.23 Short 2008-02-05T18:30:30 = 05/02/08 18.30 1995-12-22T09:05:02 = 22/12/95 09.05 -0010-09-15T04:44:23 = 15/09/-10 04.44 Default 2008-02-05T18:30:30 = 05/feb/2008 18.30.30 1995-12-22T09:05:02 = 22/dic/1995 09.05.02 -0010-09-15T04:44:23 = 15/set/-10 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 mar 1995-12-22T09:05:02 = 22 ven -0010-09-15T04:44:23 = 15 sab HHmm (HH.mm) 2008-02-05T18:30:30 = 18.30 1995-12-22T09:05:02 = 09.05 -0010-09-15T04:44:23 = 04.44 hhmm (hh.mm a) 2008-02-05T18:30:30 = 06.30 p. 1995-12-22T09:05:02 = 09.05 m. -0010-09-15T04:44:23 = 04.44 m. HHmmss (HH.mm.ss) 2008-02-05T18:30:30 = 18.30.30 1995-12-22T09:05:02 = 09.05.02 -0010-09-15T04:44:23 = 04.44.23 hhmmss (hh.mm.ss a) 2008-02-05T18:30:30 = 06.30.30 p. 1995-12-22T09:05:02 = 09.05.02 m. -0010-09-15T04:44:23 = 04.44.23 m. Hm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 p. 1995-12-22T09:05:02 = 9:05 m. -0010-09-15T04:44:23 = 4:44 m. 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 p. 1995-12-22T09:05:02 = 9:05:02 m. -0010-09-15T04:44:23 = 4:44:23 m. M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/M) 2008-02-05T18:30:30 = 5/2 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/9 MEd (EEE d/M) 2008-02-05T18:30:30 = mar 5/2 1995-12-22T09:05:02 = ven 22/12 -0010-09-15T04:44:23 = sab 15/9 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMM (LLL) 2008-02-05T18:30:30 = feb 1995-12-22T09:05:02 = dic -0010-09-15T04:44:23 = set MMMd (d MMM) 2008-02-05T18:30:30 = 5 feb 1995-12-22T09:05:02 = 22 dic -0010-09-15T04:44:23 = 15 set MMMEd (EEE d MMM) 2008-02-05T18:30:30 = mar 5 feb 1995-12-22T09:05:02 = ven 22 dic -0010-09-15T04:44:23 = sab 15 set MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 febbraio 1995-12-22T09:05:02 = 22 dicembre -0010-09-15T04:44:23 = 15 settembre MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 febbraio 1995-12-22T09:05:02 = 22 dicembre -0010-09-15T04:44:23 = 15 settembre MMMMEd (EEE d MMMM) 2008-02-05T18:30:30 = mar 5 febbraio 1995-12-22T09:05:02 = ven 22 dicembre -0010-09-15T04:44:23 = sab 15 settembre 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 (M/yyyy) 2008-02-05T18:30:30 = 2/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 9/-010 yMEd (EEE, d-M-yyyy) 2008-02-05T18:30:30 = mar, 5-2-2008 1995-12-22T09:05:02 = ven, 22-12-1995 -0010-09-15T04:44:23 = sab, 15-9--010 yMMM (MMM y) 2008-02-05T18:30:30 = feb 2008 1995-12-22T09:05:02 = dic 1995 -0010-09-15T04:44:23 = set -10 yMMMEd (EEE d MMM y) 2008-02-05T18:30:30 = mar 5 feb 2008 1995-12-22T09:05:02 = ven 22 dic 1995 -0010-09-15T04:44:23 = sab 15 set -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = febbraio 2008 1995-12-22T09:05:02 = dicembre 1995 -0010-09-15T04:44:23 = settembre -10 yQ (Q-yyyy) 2008-02-05T18:30:30 = 1-2008 1995-12-22T09:05:02 = 4-1995 -0010-09-15T04:44:23 = 3--010 yQQQ (QQQ y) 2008-02-05T18:30:30 = T1 2008 1995-12-22T09:05:02 = T4 1995 -0010-09-15T04:44:23 = T3 -10 yyMM (MM/yy) 2008-02-05T18:30:30 = 02/08 1995-12-22T09:05:02 = 12/95 -0010-09-15T04:44:23 = 09/-10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyQQQQ (QQQQ yy) 2008-02-05T18:30:30 = 1o trimestre 08 1995-12-22T09:05:02 = 4o trimestre 95 -0010-09-15T04:44:23 = 3o trimestre -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = febbraio 2008 1995-12-22T09:05:02 = dicembre 1995 -0010-09-15T04:44:23 = settembre -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week lunedi 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.18.2 2017-10-06 DateTime::Locale::it_IT(3)
All times are GMT -4. The time now is 05:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy