LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   sed question (http://www.linuxquestions.org/questions/programming-9/sed-question-440399/)

krock923 04-30-2006 08:51 PM

sed question
 
Hi there. I need to append a string to the beginning of each line in a file. It doesn't have to be using sed, but so far I've had no luck with sed for this. The worst part of all of this is that i'm using so many grep, sed and cut statements that this thing is screaming at me to learn awk. Just don't have time for that at the moment.

Thanks,
Matt

ataraxia 04-30-2006 09:29 PM

Substitute "^" with whatever string you need:
Code:

sed -e 's/^/some string/'

krock923 04-30-2006 09:36 PM

Thank you. I saw that in the sed one liner page, but i was putting an extra space after /^


All times are GMT -5. The time now is 03:44 AM.