Last active
June 24, 2023 17:06
-
-
Save dedunumax/38fc581d337df9b442f4bffce3960492 to your computer and use it in GitHub Desktop.
This file contains 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 | |
printf 'a\na\nb\nc\nd\nd' > file1 | |
printf 'b\nd' > file2 | |
echo 'Test Case 1, without sort command:' | |
grep -F -f file2 -v file1 | uniq | |
echo 'Test Case 1, with sort command:' | |
grep -F -f file2 -v file1 | sort |uniq | |
printf 'a\na\nb\nc\na\nd\nd' > file1 | |
printf 'b\nd' > file2 | |
echo 'Test Case 2, without sort command:' | |
grep -F -f file2 -v file1 | uniq | |
echo 'Test Case 2, with sort command:' | |
grep -F -f file2 -v file1 | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment