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
Avoid x-prefix in comparisons as it no longer serves a purpose.
Problematic code:
[ "x$pass"="xswordfish" ]
test x"$var" = x
Correct code:
[ "$pass"="swordfish" ]
test"$var" = ""
Rationale:
Some older shells would get confused if the first argument started with a dash, or consisted of ! or (. As a workaround, people would prefix variables and values to be compared with x to ensure the left-hand side always started with an alphanumeric character.