Add spaces to first line and another amount of spaces to all other lines

Viewed 27

I have a file where i need to put 7 spaces for the first line and 3 spaces for all the other lines.

So i did this (i put 1d to ignore the first line) :

sed -i '1 s/^/       /' $f
sed -i '1d s/^/   /' $f

It works for the first line spaces but the other one gives me this error :

sed: -e expression #1, char 4: extra characters after command
1 Answers
Related