尝试
grep -f the_ids.txt huge.csv
另外,由于您的模式似乎是固定的字符串,因此提供
-F选项可能会加快速度
grep。
-F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX.)

尝试
grep -f the_ids.txt huge.csv
另外,由于您的模式似乎是固定的字符串,因此提供
-F选项可能会加快速度
grep。
-F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX.)