Last active
September 23, 2017 18:45
-
-
Save vinsim24/e3e2edaec18dd056652b3c31519ffae2 to your computer and use it in GitHub Desktop.
BASH-Remove Leading and Trailing spaces in a file
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 | |
cat input.txt | sed 's/^[ \t]*//;s/[ \t]*$//' > output.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment