I would like to find directories that does not contain a file with name OSZICAR and then cd into that directory and do something more...
all i have now is:
find `pwd` -mindepth 2 -maxdepth 2 -type d -exec sh -c "echo {}; cd {}; ls; if [! -f $0/OSZICAR];echo "doing my thing";fi" \;
but there is error, could anyone help? Thank you
My original command without the Criteria of Not having OSZICAR is:
find `pwd` -mindepth 2 -maxdepth 2 -type d -exec sh -c "echo {}; cd {}; ls; cp ../../submit_script_Stampede.sh .; ls;sed -i s/Monkhorst/Gamma/ KPOINTS; cp CONTCAR POSCAR ;sbatch submit_script_Stampede.sh" \;