Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Joining lists on the command line
- Date: Fri, 11 Sep 2009 18:02:05 +0900
- From: Leo Howell <leo@example.com>
- Subject: Re: [tlug] Joining lists on the command line
- References: <20090911055611.GB5688@example.com> <82c89d700909110049s5083b857p6a2972de5fb81f6f@example.com>
- User-agent: Mutt/1.4.2.2i
On Fri, Sep 11, 2009 at 04:49:43PM +0900, David Shanahan wrote: > Is perl considered cheating ? > > ls | perl -e "print join(',', grep { chomp } <>);" Ah, perl :) What about this? ls | perl -ne 'chomp;print "$c$_";$c=","' It's not as elegant, but works with abitrarily long input. Just in case you wanted to format the output of "yes", say ;) Leo
- References:
- [tlug] Joining lists on the command line
- From: Leo Howell
- Re: [tlug] Joining lists on the command line
- From: David Shanahan
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Joining lists on the command line
- Next by Date: Re: [tlug] Joining lists on the command line
- Previous by thread: Re: [tlug] Joining lists on the command line
- Next by thread: Re: [tlug] Joining lists on the command line
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links