3 ms·
You probably could use process substitution to get rid of the temp file: comm -12 Whitelist <(ag MyString | awk -F: '{print $1}' | sort | uniq) > Output The
by hawski 10y ago
You probably could use process substitution to get rid of the temp file:
comm -12 Whitelist <(ag MyString | awk -F: '{print $1}' | sort | uniq) > Output
Then you could use unique flag of sort:
comm -12 Whitelist <(ag MyString | awk -F: '{print $1}' | sort -u) > Output
Also ag can list only matching files (getting rid of awk and unique):
comm -12 Whitelist <(ag -l MyString | sort) > Output
- umanwizard 10y agoThanks for the tips!