一、for循环 #!/bin/bash IFS=$IFS':' IFS=':' for folder in $PATH do echo "$folder:" for f in $folder/* do if [ -x $f ]