I have the following:
#!/bin/bash
a=0
for d in ./*/ ; do (
cd "$d"
((a++))
echo $a
); done
Which goes into each directory in my path, increments a and prints a. However, the output is always 1. Why is that?
برچسب:
نویسنده: استخدام کار