spellme.sh: fixed issues with special characters
This commit is contained in:
parent
0d5453cdd5
commit
d6d02c476e
49
spellme.sh
49
spellme.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
for i in $(seq 1 ${#1})
|
for i in $(seq 1 ${#1})
|
||||||
do
|
do
|
||||||
echo -e "$(echo "${1:i-1:1}" | \
|
echo -e $( echo -e "$(echo "${1:i-1:1}" | \
|
||||||
sed -e "s/^[aA]$/\\\\033[1;31mA\\\\033[00mLFA/" | \
|
sed -e "s/^[aA]$/\\\\033[1;31mA\\\\033[00mLFA/" | \
|
||||||
sed -e "s/^[bB]$/\\\\033[1;31mB\\\\033[00mRAVO/" | \
|
sed -e "s/^[bB]$/\\\\033[1;31mB\\\\033[00mRAVO/" | \
|
||||||
sed -e "s/^[cC]$/\\\\033[1;31mC\\\\033[00mHARLIE/" | \
|
sed -e "s/^[cC]$/\\\\033[1;31mC\\\\033[00mHARLIE/" | \
|
||||||
|
@ -27,29 +27,28 @@ do
|
||||||
sed -e "s/^[wW]$/\\\\033[1;31mW\\\\033[00mHISKEY/" | \
|
sed -e "s/^[wW]$/\\\\033[1;31mW\\\\033[00mHISKEY/" | \
|
||||||
sed -e "s/^[xX]$/\\\\033[1;31mX\\\\033[00m-RAY/" | \
|
sed -e "s/^[xX]$/\\\\033[1;31mX\\\\033[00m-RAY/" | \
|
||||||
sed -e "s/^[yY]$/\\\\033[1;31mY\\\\033[00mANKEE/" | \
|
sed -e "s/^[yY]$/\\\\033[1;31mY\\\\033[00mANKEE/" | \
|
||||||
sed -e "s/^[zZ]$/\\\\033[1;31mZ\\\\033[00mULU/" \
|
sed -e "s/^[zZ]$/\\\\033[1;31mZ\\\\033[00mULU/" | \
|
||||||
sed -e "s/^\*$/\\\\033[1;31m\*\\\\033[00mASTERISK/" \
|
sed -e "s/^\*$/\\\\033[1;31m\*\\\\033[00mASTERISK/" | \
|
||||||
sed -e "s/^\'$/\\\\033[1;31m\'\\\\033[00mSINGLE QUOTE/" \
|
sed -e "s/^\'$/\\\\033[1;31m\'\\\\033[00mSINGLE QUOTE/" | \
|
||||||
sed -e "s/^\"$/\\\\033[1;31m\"\\\\033[00mDOUBLE QUOTE/" \
|
sed -e "s/^\"$/\\\\033[1;31m\"\\\\033[00mDOUBLE QUOTE/" | \
|
||||||
sed -e "s/^\^$/\\\\033[1;31m\^\\\\033[00mCIRCUMFLEX/" \
|
sed -e "s/^\^$/\\\\033[1;31m\^\\\\033[00mCIRCUMFLEX/" | \
|
||||||
sed -e "s/^\_$/\\\\033[1;31m\_\\\\033[00mUNDERSCORE/" \
|
sed -e "s/^\_$/\\\\033[1;31m\_\\\\033[00mUNDERSCORE/" | \
|
||||||
sed -e "s/^\-$/\\\\033[1;31m\-\\\\033[00mHYPHEN/" \
|
sed -e "s/^\-$/\\\\033[1;31m\-\\\\033[00mHYPHEN/" | \
|
||||||
sed -e "s/^\&$/\\\\033[1;31m\&\\\\033[00mAMPERSAND/" \
|
sed -e "s/^\&$/\\\\033[1;31m\&\\\\033[00mAMPERSAND/" | \
|
||||||
sed -e "s/^\%$/\\\\033[1;31m\%\\\\033[00mPERCENT/" \
|
sed -e "s/^\%$/\\\\033[1;31m\%\\\\033[00mPERCENT/" | \
|
||||||
sed -e "s/^\~$/\\\\033[1;31m\~\\\\033[00mTILDE/" \
|
sed -e "s/^\~$/\\\\033[1;31m\~\\\\033[00mTILDE/" | \
|
||||||
sed -e "s/^\/$/\\\\033[1;31m\/\\\\033[00mSLASH/" \
|
sed -e "s/^\/$/\\\\033[1;31m\/\\\\033[00mSLASH/" | \
|
||||||
sed -e "s/^\\$/\\\\033[1;31m\\\\\\033[00mBACKSLASH/" \
|
sed -e "s/^\\$/\\\\033[1;31m\\\\\\033[00mBACKSLASH/" | \
|
||||||
sed -e "s/^\($/\\\\033[1;31m\(\\\\033[00mOPENING PARENTHESIS/" \
|
sed -e "s/^($/\\\\033[1;31m\(\\\\033[00mOPENING PARENTHESIS/" | \
|
||||||
sed -e "s/^\)$/\\\\033[1;31m\)\\\\033[00mCLOSING PARENTHESIS/" \
|
sed -e "s/^)$/\\\\033[1;31m\)\\\\033[00mCLOSING PARENTHESIS/" | \
|
||||||
sed -e "s/^\[$/\\\\033[1;31m\[\\\\033[00mOPENING BRACKET/" \
|
sed -e "s/^\[$/\\\\033[1;31m\[\\\\033[00mOPENING BRACKET/" | \
|
||||||
sed -e "s/^\]$/\\\\033[1;31m\]\\\\033[00mCLOSING BRACKET/" \
|
sed -e "s/^\]$/\\\\033[1;31m\]\\\\033[00mCLOSING BRACKET/" | \
|
||||||
sed -e "s/^\{$/\\\\033[1;31m\{\\\\033[00mOPENING (CURLY)BRACE/" \
|
sed -e "s/^{$/\\\\033[1;31m\{\\\\033[00mOPENING (CURLY)BRACE/" | \
|
||||||
sed -e "s/^\}$/\\\\033[1;31m\}\\\\033[00mCLOSING (CURLY)BRACE/" \
|
sed -e "s/^}$/\\\\033[1;31m\}\\\\033[00mCLOSING (CURLY)BRACE/" | \
|
||||||
sed -e "s/^\<$/\\\\033[1;31m\<\\\\033[00mOPENING ANGLE BRACKET/" \
|
sed -e "s/^<$/\\\\033[1;31m\<\\\\033[00mOPENING ANGLE BRACKET/" | \
|
||||||
sed -e "s/^\>$/\\\\033[1;31m\>\\\\033[00mCLOSING ANGLE BRACKET/" \
|
sed -e "s/^>$/\\\\033[1;31m\>\\\\033[00mCLOSING ANGLE BRACKET/" | \
|
||||||
sed -e "s/^\|$/\\\\033[1;31m\|\\\\033[00mVERTICAL BAR/" \
|
sed -e "s/^\#$/\\\\033[1;31m\#\\\\033[00mHASH/" | \
|
||||||
sed -e "s/^\#$/\\\\033[1;31m\#\\\\033[00mHASH/" \
|
sed -e "s/^\@$/\\\\033[1;31m\@\\\\033[00mAT-SIGN/" | \
|
||||||
sed -e "s/^\@$/\\\\033[1;31m\@\\\\033[00mAT-SIGN/" \
|
|
||||||
sed -e "s/^\=$/\\\\033[1;31m\=\\\\033[00mEQUALS/" \
|
sed -e "s/^\=$/\\\\033[1;31m\=\\\\033[00mEQUALS/" \
|
||||||
)"
|
)" | sed -e "s/|/\\\\033[1;31m\|\\\\033[00mPIPE/" )
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue