ls -v -d -1 */fid > fid_files.ls
cat fid_files.ls
</source>
== Do something in each directory ==
With the '''fid_files.ls''', we can do ''something'' in each directory. <br>
For example do a list files in each direcory.
<source lang="bash">
set FIDS=`cat fid_files.ls`
foreach I (`seq 1 ${#FIDS}`)
set FID=${FIDS[$I]}; set DIRN=`dirname $FID`
cd $DIRN
ls
cd ..
end
</source>