Skip to content

Instantly share code, notes, and snippets.

@Crusader4Christ
Created July 12, 2020 21:00
Show Gist options
  • Save Crusader4Christ/4adcac86611c86410a3e6602e70de59b to your computer and use it in GitHub Desktop.
Save Crusader4Christ/4adcac86611c86410a3e6602e70de59b to your computer and use it in GitHub Desktop.
run bush cmd for each dir in the list
#!/bin/bash
file="./lambdas.txt"
lines=`cat $file`
targetDir=$PWD;
#for line in $(ls $targetDir/) # this cycle for all subdirs
for line in $lines; #this cycle for list from file
do
echo "Start processing for " $line
cd $targetDir/$line
for var in "$@"
do
echo "$var";
eval $var;
code=$?
done
echo " ---- End processing " $line;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment