Fixed incorrect n=1 & n=foo$n and same for $((n++))

This commit is contained in:
Vidar Holen 2012-11-15 23:23:08 -08:00
commit ad9db04856
4 changed files with 71 additions and 44 deletions

3
badcase/subshellvar4 Normal file
View file

@ -0,0 +1,3 @@
n=0;
mycmd | while read foo; do rm "$foo"; ((n++)); done
echo "Deleted $n files"