Hi all,
I want to make some script which will cd to all direcories in some directory and do something there....
let say I have
dir1
dir2
dir3
dir4
and inside all those directories, some .txt files
I made this
for i in $(ls) ;do cd $i; cd $(date +%d_%m_%Y); cat *.txt; echo " we are now in $i and $(date +%d_%m_%Y)";sleep 5; done
When I run above code it just change to first one, and cat .txt files in that dir.
I tried many options, but did not get result I want.
Any hint is welcome.
Regards,
I want to make some script which will cd to all direcories in some directory and do something there....
let say I have
dir1
dir2
dir3
dir4
and inside all those directories, some .txt files
I made this
for i in $(ls) ;do cd $i; cd $(date +%d_%m_%Y); cat *.txt; echo " we are now in $i and $(date +%d_%m_%Y)";sleep 5; done
When I run above code it just change to first one, and cat .txt files in that dir.
I tried many options, but did not get result I want.
Any hint is welcome.
Regards,