Created
August 6, 2017 07:51
-
-
Save Khalian/e70c621ad5de3d9af7230f6043cbaa3e to your computer and use it in GitHub Desktop.
Remove all characters after a given character.
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/sh | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: remcharafter character" | |
exit 1 | |
fi | |
cut -f1 -d"$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment