Hello all,

I'm trying to write a sed expression which will insert a tab at the start of each line which has some content, i.e I don't want to simply insert a tab at the beginning of every line. I've tried the following but it doesn't seem to match...
Code:
sed s/^.+$/\\t&/g [input file]
There seems to be two problems, first as mentioned the regex doesn't match anything, and also according to the sed info pages...
Code:
the REPLACEMENT can contain unescaped '&' characters which reference the whole matched portion of the pattern space
but when I try this as in my example above, it results in the subsequent "/g" being interpreted as a filename

Any pointers would be much appreciated!