<AppendNhere> A H W C
<AppendNhere> A H W C
<AppendNhere> A H W CSed '/^/ i N' filename
I tried appending N using this, but it's appending N to the beginning of new lines and not at the start of existing rows.
2 Answers
First, you need to understand "quoting" (see man bash) and regular expressions (man 7 regex) and use sed's (man sed "substitute" command.
sed -e 's/^/N/' filename You can do this with
sed -e "s/^\(.*\)/N \1/" filenameThis inserts the string N at the beginning of the line (^).