Not sure I understood your script to its entirety, but for the sorting you could make use of an awk feature. man awk:
Quote:
Multi-line records
Since mawk interprets RS as a regular expression, multi-line records are easy. Setting RS = "\n\n+", makes one or more blank lines separate records.
Applying this to your data sample, how close would this be:
Hi!
I have a trouble with the sort and the uniq.
I know I have to use them, I just have trouble with putting them in the right order.
I have a text file with unsorted lines (each line has a few words, the first word in the line is a number.).
I need to sort this file in order to be... (6 Replies)
HI all
i have a text file file1 like this
004002004545454000001
041002004545222000002
006003008751525000003
007003008751352000004
006003008751142000005
004001005745745000006
i want to sort the file according to position 1-5 and secondary sort by
the last position of file 16-21... (4 Replies)
the rows have to be sorted according to the second column (family name). In addition, the number of family names that start with a particular alphabet
character is put before the beginning of the series. Assume that the file have
4 columns with the following column formatting:
first name... (5 Replies)
Hello ,
i have a text file like this
1 a1 ,AB ,AC ;AD ,EE
2 a2 ,WE ;TR ,YT ,WW
3 a3 ;AS ,UY ;RF ,YT
i want to sort this text file based on each row , and excluding 2nd column from the sorting and not taking the comma or ; into consideration in the sorting, so it will become like this... (12 Replies)
input ("/" delimited fields):
style1/book1 (author_C)/editor1/2000
style1/book2 (author_A)/editor2/2004
style1/book3 (author_B)/editor3/2001
style2/book8 (author_B)/editor4/2010
style2/book5 (author_A)/editor2/1998
Records with same field 1 belong to the same group.
Using asort (not sort),... (3 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Output from zipdiff GNU EAR comparison tool produces output in html divided into three sections "Added, Removed, Changed". I want the output to be sorted by jar or war file.
<html>
<body>
<table>
<tr>
<td class="diffs" colspan="2">Added </td>
</tr>
<tr><td>
<ul>... (5 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT DEBIAN
finance::quote::yahoo::europe
Finance::Quote::Yahoo::Europe(3pm) User Contributed Perl Documentation Finance::Quote::Yahoo::Europe(3pm)NAME
Finance::Quote::Yahoo::Europe - Fetch quotes from Yahoo Europe
SYNOPSIS
use Finance::Quote;
$q = Finance::Quote->new;
%info = $q->fetch("europe","UG.PA"); # Failover to other methods ok.
%info = $q->fetch("yahoo_europe","UG.PA"); # Use this module only.
DESCRIPTION
This module fetches information from Yahoo Europe. Symbols should be provided in the format "SYMBOL.EXCHANGE", where the exchange code is
one of the following:
PA - Paris
BC - Barcelona
BE - Berlin
BI - Bilbao
BR - Brussels
CO - Copenhagen
D - Dusseldorf
F - Frankfurt
H - Hamburg
HA - Hanover
L - London
MA - Madrid
MC - Madrid (M.C.)
MI - Milan
MU - Munich
O - Oslo
ST - Stockholm
SG - Stuttgart
VA - Valence
VI - Vienna
DE - Xetra (was FX)
This module provides both the "europe" and "yahoo_europe" methods. The "europe" method should be used if failover methods are desirable.
The "yahoo_europe" method should be used you desire to only fetch information from Yahoo Europe.
This module is loaded by default by Finance::Quote, but can be loaded explicitly by specifying the parameter "Yahoo::Europe" to
Finance::Quote->new().
Information obtained by this module may be covered by Yahoo's terms and conditions. See http://finance.uk.yahoo.com/ for more details.
SPECIFIC NOTES ON CERTAIN SYMBOLS
Starting in November 2010, the Yahoo site didn't respond to ^DJI symbol retrieval. Use ^DJI.US instead.
LABELS RETURNED
This module returns all the standard labels (where available) provided by Yahoo. See Finance::Quote::Yahoo::Base for a list of these. The
currency label is also returned.
Note however that div_date and ex_div have been removed by yahoo europe site
SEE ALSO
Yahoo Europe, http://finance.uk.yahoo.com/
Finance::Quote::Yahoo::Base
perl v5.14.2 2014-03-03 Finance::Quote::Yahoo::Europe(3pm)