Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Favourite One-liners?

by etcshadow (Priest)
on Jun 27, 2005 at 23:58 UTC ( #470422=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/bin/sh
    
    ...
    
    perl -l -$looptype -e 'BEGIN{$SIG{PIPE}="exit"; $|=1; $/=\108; ($f,$c,
    +$/)=(<> =~ /^ISA(.).{100}(.)(.?\r?\n?)/); ($f,$c)=("\Q$f","\Q$c"); se
    ek ARGV,0,0; $.=0}' -F'/$f/' "$@"
    
  2. or download this
    x12cat -ne 'print if /^PLB/' file.x12  # grep for PLB segments
    x12cat -ane '$amt{$F[1]} += $F[2] if /^AMT/; END{ print "$_: $amt{$_}"
    + for sort {$amt{$b}<=>$amt{$a}} keys %amt }' file1.x12 file2.x12 ... 
    +# print sorted break down, by amount descending, of AMT code-types
    
  3. or download this
    ------------
    :Wq
    Not an editor command: Wq
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://470422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2019-07-23 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (26 votes). Check out past polls.

    Notices?