while read line;
do
awk '/ differ$/ {print "diff "$2" "$4" > "$2".diff"}{}';
done < diffs.txt
This prints the command exactly as I want it. How do I tell it to execute the command?
| bash
does the trick...
while read line;
do
awk '/ differ$/ {print "diff "$2" "$4" > "$2".diff"}{}' | bash;
done < diffs.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With