Created
August 31, 2022 16:08
-
-
Save noel-yap/bf0195476fb6eb219d1d809b7cc3a062 to your computer and use it in GitHub Desktop.
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 | |
set -e | |
set -o pipefail | |
set -u | |
aoeu=a/o/e/u | |
echo "aoeu=${aoeu}" # aoeu=a/o/e/u | |
echo "aoeu%/*=${aoeu%/*}" # aoeu%/*=a/o/e | |
echo "aoeu%%/*=${aoeu%%/*}" # aoeu%%/*=a | |
echo "aoeu%*/=${aoeu%*/}" # aoeu%*/=a/o/e/u | |
echo "aoeu%%*/=${aoeu%%*/}" # aoeu%%*/=a/o/e/u | |
echo "aoeu#/*=${aoeu#/*}" # aoeu#/*=a/o/e/u | |
echo "aoeu##/=*${aoeu##/*}" # aoeu##/=*a/o/e/u | |
echo "aoeu#*/=${aoeu#*/}" # aoeu#*/=o/e/u | |
echo "aoeu##*/=${aoeu##*/}" # aoeu##*/=u | |
aoeu='a//o//e//u' | |
echo "aoeu//\//=${aoeu//\/\//\/}" # aoeu//\//=a/o/e/u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment