I don't understand this. I have a text file with this in it:
(that's 4 spaces, not a tab)
If I run this command to remove the spaces, it works:
but if I run this command it doesn't work:
+ means 1 or more of the previous characters, and there are definitely 1 or more spaces, so why doesn't the 2nd command work?
Code:
1234
If I run this command to remove the spaces, it works:
Code:
sed -i -e "s/^[ ]*//" out.txt
Code:
sed -i -e "s/^[ ]+//" out.txt
+ means 1 or more of the previous characters, and there are definitely 1 or more spaces, so why doesn't the 2nd command work?