Feature #643
Using Sed To Add Spaces To The Beginning Of Each Line Of A File
Description
This is a super simple way of adding a number of spaces to the beginning of each line of a given file.
- Add 3 spaces to the beginning of every line of a file:
sed -i -e 's/^/ /' example-file.txt
Resources¶
Updated by Daniel Curtis over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Updated by Daniel Curtis over 9 years ago
- Subject changed from Using Sed To Add Spaces To Each Line Of A File to Using Sed To Add Spaces To The Beginning Of Each Line Of A File