Created
February 24, 2020 18:59
-
-
Save ARolek/91df1f4e8ced5331f7914c8a97f61ffb to your computer and use it in GitHub Desktop.
detecting tabs in bash
This file contains 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 | |
str="AIN TRA" | |
delimiter=$(echo $str | perl -ne "print /AIN(.{1})/") | |
echo "delimiter is '$delimiter'" | |
if [[ $delimiter = [^\t] ]]; then | |
echo "ok" | |
else | |
echo "no" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment