{"body":"# Q:  are files in lib2 contained in lib?  \n\n# below has 34 files \nls -1 --color=none ../foo/lib2/ > /tmp/lib2.txt\n\n# below has 166 files\nls -1 --color=none lib/ > /tmp/lib.txt\n\n# Find what files if any in lib2 are contained in lib\ngit diff --color=never --word-diff /tmp/lib{2,}.txt | egrep '^\\w' | sed -n '3,$p' > /tmp/libs_common_to_both_libs_and_lib2.txt\n# raw git diff output (with line #s) looks something like:  \n# 1 diff --git a/tmp/lib2.txt b/tmp/lib.txt\n# 2 index 6407082..4a23e01 100644\n# 3 --- a/tmp/lib2.txt\n# 4 +++ b/tmp/lib.txt\n# 5 @@ -1,5 +1,74 @@\n# 6 {+foo-1.14.jar+}\n# 7 bar-2.3.jar\n# 8 {+baz-3.14.jar+}\n# ...\n# egrep filters out all lines that don't begin with a word char (2-4,5,7,etc.)\n# the sed command is to strip header (1-2)  \n\n# compare what's common to both with original lib2 list to find what's extra\ngit diff --color=never --word-diff /tmp/lib{s_common_to_both_libs_and_lib2,2}.txt\n# raw git diff output (with line #s) looks something like:  \n# 1 diff --git a/tmp/libs_common_to_both_libs_and_lib2.txt b/tmp/lib.txt\n# 2 index 6407082..4a23e01 100644\n# 3 --- a/tmp/libs_common_to_both_libs_and_lib2.txt\n# 4 +++ b/tmp/lib.txt\n# 5 @@ -1,5 +1,74 @@\n# 6 {+foo-1.14.jar+}\n# 7 bar-2.3.jar\n# 8 {+baz-3.14.jar+}\n# ...\n\n# files prefixed with {+ == files that are missing from lib2 list?\n","name":"lib2_vs_lib_compare.bash","extension":"bash","url":"https://www.irccloud.com/pastebin/cG4ksCZ9/lib2_vs_lib_compare.bash","modified":1605696799,"id":"cG4ksCZ9","size":1307,"lines":37,"own_paste":false,"theme":"","date":1605696799}