Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Merging files, 1 line for every 10 (one-liner)

by BrowserUk (Pope)
on Sep 06, 2011 at 22:10 UTC ( #924474=note: print w/ replies, xml ) Need Help??


in reply to Merging files, 1 line for every 10

A one-liner:

perl -ple"printf q[%s], scalar <STDIN> unless $n++ % 10" file1 < file2

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: Merging files, 1 line for every 10 (one-liner)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-07-13 13:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (249 votes), past polls