大容量ログファイルをフィルタリングする方法は?

大容量ログファイルをフィルタリングする方法は?

データがあります

15:29:05:493582: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:450] Ask[price:3215 qty:600].
15:29:05:480193: Impact Cost :Current[0.15] Required[5.00] Bid[price:3195 qty:450] Ask[price:3210 qty:75].
15:29:05:462943: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:450] Ask[price:3215 qty:600].
15:29:05:462886: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:450] Ask[price:3215 qty:600].
15:29:05:462789: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:450] Ask[price:3215 qty:600].
15:29:05:447389: Impact Cost :Current[0.15] Required[5.00] Bid[price:3195 qty:450] Ask[price:3210 qty:75].
15:29:05:446545: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:450] Ask[price:3215 qty:600].
15:29:05:446381: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:525] Ask[price:3215 qty:600].
15:29:05:409039: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:75] Ask[price:3215 qty:600].
15:29:05:409019: Impact Cost :Current[0.20] Required[5.00] Bid[price:3195 qty:75] Ask[price:3215 qty:600].

出力が欲しいです。

Bid[price:3195 qty:450] Ask[price:3215 qty:600].
Bid[price:3195 qty:450] Ask[price:3210 qty:75].
Bid[price:3195 qty:450] Ask[price:3215 qty:600].
Bid[price:3195 qty:450] Ask[price:3215 qty:600].
Bid[price:3195 qty:450] Ask[price:3215 qty:600].
Bid[price:3195 qty:450] Ask[price:3210 qty:75].
Bid[price:3195 qty:450] Ask[price:3215 qty:600].
Bid[price:3195 qty:525] Ask[price:3215 qty:600].
Bid[price:3195 qty:75] Ask[price:3215 qty:600].
Bid[price:3195 qty:75] Ask[price:3215 qty:600].

端末を使用して.txtファイルから抽出する方法を教えてください。

ベストアンサー1

正規表現エンジンを必要としないソリューション:

$ cut -d ' ' -f 6- logfile

この場合、cutユーティリティは6番目の列から始まるすべての列を提供します。各行のすべてのスペースを列区切り文字として扱います。

おすすめ記事