Re: output from multiple files

Discussion in 'Perl' started by Alan Connor, Apr 28, 2005.

  1. Alan Connor

    Alan Connor Guest

    On comp.unix.shell, in <m71ce.4891$0X6.2216@edtnps90>, "John W. Krahn" wrote:
    >
    >
    > wrote:
    >> There are three files called first , second and third . Each is having
    >> three columns
    >>
    >> $cat first
    >> a b c
    >>
    >> $cat second
    >> d e f
    >>
    >> $cat third
    >> g h i
    >>
    >> I want the output in this format
    >> a b c e f h i
    >>
    >> In short from second and third file i want just two columns not all.

    >
    > perl -lane'push@a,splice@F,$.!=1}{print"@a"' first second third
    >


    Why use a nuclear warhead to remove an old stump?

    This can be done with just the shell or tiny utilities.

    >
    > John
    > --
    > use Perl;
    > program
    > fulfillment


    Errrr....This isn't a perl group.

    Perl has its own groups.

    These aren't enough for you?!

    alt.comp.perlcgi.freelance
    alt.perl
    comp.lang.perl
    comp.lang.perl.announce
    comp.lang.perl.misc
    comp.lang.perl.moderated
    comp.lang.perl.modules
    comp.lang.perl.tk
    cz.comp.lang.perl
    de.comp.lang.perl.cgi
    de.comp.lang.perl.misc
    dk.edb.programmering.perl
    eug.comp.lang.perl
    fido7.ru.cgi.perl
    fido7.ru.cgi.perl.chainik
    fido7.ru.perl
    fido7.ru.perlowka
    fj.comp.lang.perl
    fj.lang.perl
    fr.comp.lang.perl
    han.comp.lang.perl
    it.comp.lang.perl
    japan.comp.lang.perl
    no.it.programmering.perl
    novell.devsup.perl
    perl.64bit
    perl.advocacy
    perl.agents
    perl.ai
    perl.beginners
    perl.beginners.cgi
    perl.books.workers
    perl.bootstrap
    perl.bugmongers
    perl.committers.parrot
    perl.copenhagen
    perl.cpan.cluster
    perl.cpan.interface
    perl.cpan.testers
    perl.cpan.workers
    perl.crypto
    perl.cvs.mod_parrot
    perl.cvs.p5ee
    perl.cvs.parrot
    perl.cvs.pdp
    perl.cvs.perlfaq
    perl.daily-build
    perl.daily-build.reports
    perl.daily.news
    perl.datetime
    perl.dbi.announce
    perl.dbi.dev
    perl.dbi.oracle-oci
    perl.dbi.users
    perl.dist
    perl.documentation
    perl.foundation.newsletter
    perl.fwp
    perl.golf
    perl.gov
    perl.i18n
    perl.inline
    perl.ithreads
    perl.javascript
    perl.jobs
    perl.jobs.discuss
    perl.jpl
    perl.libnet
    perl.libwww
    perl.loop
    perl.mac.toolbox
    perl.macosx
    perl.macperl
    perl.macperl.announce
    perl.macperl.anyperl
    perl.macperl.forum
    perl.macperl.modules
    perl.macperl.porters
    perl.macperl.scribes
    perl.macperl.toolbox
    perl.macperl.webcgi
    perl.makemaker
    perl.midi
    perl.module-authors
    perl.modules
    perl.mvs
    perl.ok
    perl.p5ee
    perl.packrats
    perl.perl1.porters
    perl.perl5.build
    perl.perl5.changes
    perl.perl5.changes.mac
    perl.perl5.porters
    perl.perl5.summary
    perl.perl6.announce
    perl.perl6.announce.rfc
    perl.perl6.build
    perl.perl6.documentation
    perl.perl6.internals
    perl.perl6.internals.api.embed
    perl.perl6.internals.api.parser
    perl.perl6.internals.bignum
    perl.perl6.internals.unicode
    perl.perl6.language
    perl.perl6.language.data
    perl.perl6.language.datetime
    perl.perl6.language.errors
    perl.perl6.language.flow
    perl.perl6.language.io
    perl.perl6.language.mlc
    perl.perl6.language.objects
    perl.perl6.language.regex
    perl.perl6.language.strict
    perl.perl6.language.subs
    perl.perl6.licenses
    perl.perl6.meta
    perl.perl6.porters
    perl.perl6.source.control
    perl.perl6.stdlib
    perl.perlfaq.workers
    perl.perlpoint
    perl.pod-people
    perl.poe
    perl.ppt
    perl.qa
    perl.qa.cvs
    perl.qa.metrics
    perl.qpsmtpd
    perl.recdescent
    perl.release-announce
    perl.riscos
    perl.rtos
    perl.scripts
    perl.sdk
    perl.test
    perl.tips
    perl.trainers
    perl.unicode
    perl.vmsperl
    perl.xs
    pl.comp.lang.perl
    relcom.comp.lang.perl
    tw.bbs.comp.lang.perl


    AC


    --
    Perl: When a real programming language just won't do.
     
    Alan Connor, Apr 28, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    1,001
    M.E.Farmer
    Feb 13, 2005
  2. Replies:
    14
    Views:
    546
    Fuzzyman
    Feb 17, 2007
  3. malla
    Replies:
    9
    Views:
    403
    Eric Pruneau
    Aug 9, 2006
  4. Froefel
    Replies:
    2
    Views:
    1,129
    Wizfrog
    Nov 22, 2007
  5. Milo Thurston

    Write output to multiple files

    Milo Thurston, Apr 23, 2009, in forum: Ruby
    Replies:
    1
    Views:
    177
    Milo Thurston
    Apr 23, 2009
Loading...

Share This Page