Skip to content

Instantly share code, notes, and snippets.

@rpetrenko
Created February 6, 2023 21:23
Show Gist options
  • Save rpetrenko/44479ad62c4675c35e8409d74d165601 to your computer and use it in GitHub Desktop.
Save rpetrenko/44479ad62c4675c35e8409d74d165601 to your computer and use it in GitHub Desktop.
# when adding values from $FROM to $T0
# print only those lines which are not found in $TO
# be carefull with partial match
FROM=$1
TO=$2
for x in `cat $FROM`;do
grep $x $TO > /dev/null;
ret=$?;
if [ $ret -ne 0 ];then
echo $x;
fi;
done
@rpetrenko
Copy link
Author

this is helpful if we can't sort both files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment