-   Programming (
-   -   sed question (

krock923 04-30-2006 09: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.


ataraxia 04-30-2006 10:29 PM

Substitute "^" with whatever string you need:

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

krock923 04-30-2006 10: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 08:55 AM.