我有数据
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].
Run Code Online (Sandbox Code Playgroud)
我想输出为
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].
Run Code Online (Sandbox Code Playgroud)
请告诉我如何使用终端从 .txt 文件中提取它。
不需要正则表达式引擎的解决方案:
$ cut -d ' ' -f 6- logfile
Run Code Online (Sandbox Code Playgroud)
cut
在这种情况下,该实用程序将为您提供从第 6 列开始的所有列。它将每一行上的每个空格视为列分隔符。
归档时间: |
|
查看次数: |
87 次 |
最近记录: |