4 ms·
> You cannot do this with [ Why not? [ -d /nix ] && echo ...
by teo_zero 3y ago
> You cannot do this with [
Why not?
[ -d /nix ] && echo ...
- forgotpwd16 3y agoAs '$_' is set to last arg of previous run command, the test example will have it be the name of directory whereas for [ will always be ].
- elteto 3y agoD=/nix test -d $D && echo $D exists …
- cagey 3y ago$ V=nada echo "x${V}x" xx
- Dylan16807 3y agoV=nada; echo "x${V}x"
- teo_zero 3y agoAh yes, now I see it.