How do I trim leading and trailing whitespace from each line of some output?

Subscribers:
4,110
Published on ● Video Link: https://www.youtube.com/watch?v=DsTGo7IOQa4



Duration: 4:43
0 views
0


How do I trim leading and trailing whitespace from each line of some output?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(unix.stackexchange.com/users/20661/rubo77)rubo77 |
(unix.stackexchange.com/users/22565/st%c3%a9phane-chazelas)Stéphane Chazelas |
(unix.stackexchange.com/users/7453/slm)slm |
(unix.stackexchange.com/users/133416/newton-jose)Newton_Jose |
(unix.stackexchange.com/users/20661/rubo77)rubo77 |
(unix.stackexchange.com/users/228177/%c5%81ukasz-rajchel)Łukasz Rajchel |
A special thanks goes out to the (https://unix.stackexchange.com/questions/102008/how-do-i-trim-leading-and-trailing-whitespace-from-each-line-of-some-output)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

pipe whitespace shell-script text-processing







Tags:
pipe
whitespace
shell-script
text-processing