find . -type f -name '*.R' -exec grep -l "pattern" {} \;
similar to:
find folder -type f -name '*.R' | xargs grep "pattern"
start_time=$(date -R)
set -e
[...]
echo "*** DONE"
end_time=$(date -R)
echo $start_time
echo $end_time
exit 0
function mvBack {
echo "... go back to my folder"
cd $runDir
}
trap mvBack EXIT
for file in *.jpg ; do mv $file ${file//IMG/myVacation} ; done
for chromo in ( "chr"{1..22} ); do echo $chromo; done
cat ./SAMPLES.txt| while read SAMPLE
do
mkdir ${OUTDIR}/${SAMPLE}
done
cp top-words-{1,2}.sh # copy 1 to 2
df -h
du -sh FOLDER_NAME