echo a loop with variables command
I have several lists and want to run some commands over them. As lists are long I want to run those commands parallel to each other, hence using nohup.
For every item I tried to echo a loop that contains a nohup command, but it doesn't work.
How can I set those nohup commands running in parallel?
for a in $(cat list_of_names)
do
ID=`echo $a`
mkdir ${ID}
echo "
nohup sh -c '
for b in $(cat another_list_of_names)
do
./tools $b $a > ${ID}/
done' &
"
done
I have several lists and want to run some commands over them. As lists are long I want to run those commands parallel to each other, hence using nohup.
For every item I tried to echo a loop that contains a nohup command, but it doesn't work.
How can I set those nohup commands running in parallel?
for a in $(cat list_of_names)
do
ID=`echo $a`
mkdir ${ID}
echo "
nohup sh -c '
for b in $(cat another_list_of_names)
do
./tools $b $a > ${ID}/
done' &
"
done
No comments:
Post a Comment