On Wed, Jul 15, 2009 at 12:21 PM, Zak B. Elep <[email protected]> wrote:
> On Wed, Jul 15, 2009 at 12:14 PM, david t. asuncion, > jr.<[email protected]> wrote: > > A total CLI newbie here. :) > > > > I have a file like this... > > > > cat porndomain.acl > > > > sex.com > > blahblah.com > > weak.com > > .... > > > > What I want to happen is to add a "." on each line to look like this... > > > > .sex.com > > .blahblah.com > > .weak.com > > > > How can I do that with one line of command in Linux? > > Here's a Perl one-liner: > > $ perl -pi.bak -e 's/^/./' porndomain.acl > > The original file is saved at porndomain.acl.bak, in case it is botched. > Thank you very much Zak. It works. I'm using it for my Squid. :) > > > -- > Zak B. Elep || zakame.net > 1486 7957 454D E529 E4F1 F75E 5787 B1FD FA53 851D > _________________________________________________ > Philippine Linux Users' Group (PLUG) Mailing List > http://lists.linux.org.ph/mailman/listinfo/plug > Searchable Archives: http://archives.free.net.ph > -- David Tacasa Asuncion, Jr. website keeper, forever linux newbie, BUM extraordinaire Linux User # 406430 http://counter.li.org/ GPG: 0A024BC0
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List http://lists.linux.org.ph/mailman/listinfo/plug Searchable Archives: http://archives.free.net.ph

