Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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
    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
    Not an editor command: Wq

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2016-10-21 10:22 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (288 votes). Check out past polls.