Technology
💾 Once upon a time, I was interested in writing reliable and efficient shell scripts. Using shell builtins was an eye-opener. Today I remembered about parameter expansion:
mystr="$(uname -o)"
# If we find "Linux", we get an empty string
[ ! -n "${mystr##*Linux*}" ] && printf "We are on Linux.\n"
Sunday January 21, 2024