You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
For the love of Bash and own safety, please do quote variables; The extension is to be .bash, not .sh, or go without any. Of course not forget to start a Bash script with this to make it run right:
#!/usr/bin/env bash
Anyways, the 1st shall've "${1:-""}" to be the same, no parsing errors then. Why? if ; then must have something between if and ; and you may just put safe : or simple true to bypass it, though it is sort of pointless in this case and should be like if [[ -n "${1:-""}" ]]; then if want to just make sure something is in "${1:-""}". On echo, please prefer to use more predictable safe printf instead or upgrade echo by this simple function at the start of a script:
echo() { printf -- '%s\n' "${*:-""}"; }
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hi guys, would someone please explain the follow:
I test these on bash version: 5.0.0(1)-release, 4.4.20(1)-release
The text was updated successfully, but these errors were encountered: