编辑代码

#!/bin/bash
function ergodic(){
for file in ` ls $1 `
do
if [ -d $1"/"$file ]
then
ergodic $1"/"$file

fi
done
}
echo $PWD
export INIT_PATH=$PWD
echo $INIT_PATH

touch abc.dat
echo 'asfwgr' > abc.dat
echo 'ajaiw'
ls $INIT_PATH
less abc.dat
ergodic $INIT_PATH