Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-12-21 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (108 votes), past polls