How to remove previous spaces before 809in my output echo??
here is my example:
$ echo ' 809 23/Dec/2008:19:20'
809 23/Dec/2008:19:20
^^^3 spaces here preceding the 809
I can remove 3 or 4 spaces with sed:
...4 spaces here
$ echo ' 809 23/Dec/2008:19:20' | sed 's/^.\{3\,4\}//'
809 23/Dec/2008:19:20
0 spaces here preceding the 809
But I want my sed team to work on something more than 3
.....5 spaces here
$ echo ' 809 23/Dec/2008:19:20' | sed 's/^.\{3\,4\}//'
809 23/Dec/2008:19:20
^1 spaces here preceding the 809
Ho, am I writing my regular expression in sed to remove 3 or more spaces preceding 809?
source
share