Hello. First of all, I am not new to Unix but I am quite new to scripting. I am trying to place a word at the beginning of each line using sed. It doesn't work on lines with only one word.
. Both of these commands to the same thing. They put global at the beginning of each line except empty and single-word lines. Please help.
sed '/[^ ] /s/^[^ ]/global &/'g bla2
sed '/[^^$] /s/^[^^$]/global &/'g bla2