On Apr 2, 9:04 am, [EMAIL PROTECTED] (Matthew Whipple) wrote:
> LC_ALL=C sort echo.txt
>
>
>
> [EMAIL PROTECTED] wrote:
> > On Mar 29, 3:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
>
> >> [EMAIL PROTECTED] wrote:
>
> >>> When I do string comparisons in perl the strings seem to ignore the
> >>>
Is there a l link to a brief summary of perl (5-10 pages)?
What is the proper syntax to set LC_ALL for within a perl script?
I want to run linux commands like sort, grep, uniq from within a perl
script.
But I want them to optionally continue to act like pipes.
For example,
I want ./perlsort to ac
On Mar 29, 3:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> [EMAIL PROTECTED] wrote:
> > When I do string comparisons in perl the strings seem to ignore the
> > embedded hyphens.
> > I want to sort strings assuming the 'dictionary' order of the chars is
> > ASCII order: hypen, 0-9, A-Z.
> > It a
On Mar 31, 11:44 am, [EMAIL PROTECTED] (Dr.Ruud) wrote:
> [EMAIL PROTECTED] schreef:
>
> > unsorted:
> > 22
> > 2-2
> > 2-3
> > 23
> > 21
>
> > linux sort produces:
> > 21
> > 22
> > 2-2
> > 23
> > 2-3
>
> $ echo '
> 21
> 22
> 2-4
> 2-2
> 23
> 2-3
> ' |sort -n
>
> 2-2
> 2-3
> 2-4
> 21
> 22
> 23
>
>
On Mar 30, 10:57 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> [EMAIL PROTECTED] wrote:
>
> > On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
>
> >> [EMAIL PROTECTED] wrote:
>
> >>> When I do string comparisons in perl the strings seem to ignore the
> >>> embedded hyphens.
> >>> I wan
On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> [EMAIL PROTECTED] wrote:
> > When I do string comparisons in perl the strings seem to ignore the
> > embedded hyphens.
> > I want to sort strings assuming the 'dictionary' order of the chars is
> > ASCII order: hypen, 0-9, A-Z.
> > It a
When I do string comparisons in perl the strings seem to ignore the
embedded hyphens.
I want to sort strings assuming the 'dictionary' order of the chars is
ASCII order: hypen, 0-9, A-Z.
It appears linux sort also has the problem (LC_ALL is blank).
Any ideas? I want to avoid a brute force char by c
On Mar 28, 6:54 pm, [EMAIL PROTECTED] (Lawrence Statton) wrote:
> If you're using Gnu diff (i.e. the diff that comes with most Linuces)
> --speed-large-files might help you, without having to jump through a
> perl hoop.
>
> --L
Problems:
1) it runs out of memory 8Gig of files with 2GB RAM
2) it as
I've got two similar large files with one word per line and they're
sorted.
Each file has a few words not in the other.
I typically identify the unique words in the file using diff,grep,cut.
When the files are too big (2Gig) diff dies with "memory exhausted".
I want to search for the unique words
Worked great.
One additional thing,
I want to use it as is with two args
or, if only one arg is passed, then data_file comes from stdin?
Thanks Again
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Mar 26, 12:27 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote:
> On Wed, Mar 26, 2008 at 8:18 AM, <[EMAIL PROTECTED]> wrote:
> > I have two sorted files (one string per line).
> > [I'd also like to know how to sorvle this if the lists weren't sorted
> > (as complimented sets)].]
> > I want to outp
I have two sorted files (one string per line).
[I'd also like to know how to sorvle this if the lists weren't sorted
(as complimented sets)].]
I want to output the List1 items not found in the List2 file.
grep is too slow.
diff gets stuck because list2 has millions of items.
for example:
List1.txt
12 matches
Mail list logo