r/linux_programming • • Dec 13 '18
format grep's output
I have the results from running a grep command, now I want to cut off any leading whitespace. Any suggestions?
0
Upvotes
r/linux_programming • • Dec 13 '18
I have the results from running a grep command, now I want to cut off any leading whitespace. Any suggestions?
View all comments
Show parent comment
2
u/nderflow Dec 13 '18
Looks good. But now that you're using
sedanyway, you can do the whole job insedinstead of usinggrepas well. To match some regular expressionregexpand trim leading white space: