try:

sed -e "s/^\(.*\)$/\.\1/g" infile | less

if you like what you see, you can use sed's -i option to edit the file in place.


--- mike t.



>
>From: "david t. asuncion, jr." <[email protected]>
>To: [email protected]
>Sent: Thursday, January 21, 2010 15:13:02
>Subject: [plug] command to put a dot infront of each line in a file?!
>
>I must admit that I asked this question some years back but when I tried to a 
>search the archives, I can't find it. :(
>
>
>
>I have a file (let's say 'censored.acl') with the following contents...
>
>
>google.com
>yahoo.com
>facebook.com
>
>
>What command can I use to put a dot in front of each line, to wit;
>
>
>.google.com
>>.yahoo.com
>.facebook.com
>
>
>Anyone?! 
>
>
>This time I will surely save it!
>
>
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to