how to write a recursive fcn using ksh to find all the occurances of a file?
how to write a recursive fcn using ksh to find all the occurances of a file?# Unix - 噫吁兮,危乎高哉
r*n
1 楼
之前不是过年的时候 还改一下标志么 这几年都没有了。。
y*y
2 楼
Hi, I want to write a shell script to display all the occurances of bin directory, the code like this: #!/usr/bin/ksh recursive ( ) { for i in * do if [[ $i == bin ]] then print "$(pwd)/$i" fi
if [[ -d $i ]] then cd $i recursive fi done } #call the function recursive cd / for i in * do recursive done #end of file The problem is only the first directory in cu