Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2 つのテキスト ファイルがあります。
File 1: abc 1x21
と
File 2: sdc 1x43 xcvyu 03x01 abc 1x21 xyz 4x23
取得したい
File 3: sdc 1x43 xcvyu 03x01 xyz 4x23
このスレッドで似たようなものを見つけましたが、うまくいきませんでした。
この行を試してください:
awk 'NR==FNR{a[$0];next} !($0 in a)' file1 file2 > file3
テストしませんでしたが、動作するはずです。