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. -- 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

