Created
December 16, 2016 23:51
-
-
Save meelih/aaad7c6b92e9036b0ac10fa5addd07ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file_a=`cat $1` | |
file_b=`cat $2` | |
while IFS= read -r line_a | |
do | |
while IFS= read -r line_b | |
do | |
if [ "$line_a" != "$line_b" ];then | |
#echo "$line_a : $line_b" | |
echo "$line_b will be deleted" | |
echo "----" | |
docker rmi -f $line_b | |
elif [ "$line_a" == "$line_b" ];then | |
#echo "$line_a : $line_b" | |
echo "$line_a will be unchanged" | |
echo "----" | |
fi | |
done <<< "$file_b" | |
done <<< "$file_a" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment