4
votes
Accepted
How and why does using redirection or writing files within an if statement affect exit code?
$?
In the PARAMETERS SET BY THE SHELL section of man zshparam, or info zsh 'Parameters Set By The Shell' you'll see that, $? is the exit status returned by the last command.
$(...)
In man zshexpn or ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
scripting × 4424bash × 1512
shell-script × 1136
shell × 728
linux × 654
text-processing × 280
awk × 280
sed × 182
files × 172
command-line × 135
grep × 134
ssh × 133
cron × 103
find × 86
variable × 80
ubuntu × 74
terminal × 74
python × 74
perl × 66
rename × 65
ksh × 62
debian × 59
networking × 57
regular-expression × 52
zsh × 51