How do I remove the preceding spaces before 809 in the output of my echo??
here is my sample:
$ 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 using 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 what I want is my sed command to work on anything greater 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 do I write my regex in the sed to remove 3 or more spaces preceding 809?

sed 's/^[[:blank:]]\{3,\}//'if you want to remove 3 or more spaces at the start.^\s{3,}.in the regexp? That matches any character, not just spaces.