Created
June 3, 2022 15:26
-
-
Save haeramkeem/e12d1ef6239d4efb2679fb52ada7b5bb to your computer and use it in GitHub Desktop.
SED remove all whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove all whitespace | |
# Ref: https://www.baeldung.com/linux/remove-whitespace-from-file#2-removing-all-whitespace-characters- | |
sed ':a; N; s/[[:space:]]//g; ta' testfile.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment