gpt4 book ai didi

mysql - sed 从 .csv 中删除单词 + 空格 |优尼克斯 |太阳系

转载 作者:行者123 更新时间:2023-12-01 00:18:08 30 4
gpt4 key购买 nike

我有以下要加载到 Oracle 表的 csv 文件。

cat to_load_pplp.csv

Table PPL_CH_USAGE,178,01/Sep/2017 09:03:30,01/Sep/2017 09:03:30
PPL_INVOICE,22015731,01/Sep/2017 05:30:21,01/Sep/2017 05:30:21
PPL_LIABILITY,2468705,01/Sep/2017 06:56:41,01/Sep/2017 06:56:41
Table MBBSCS_PPL_INVOICE,3768639,01/Sep/2017 07:00:15,01/Sep/2017 07:00:15
Table MBBSCS_PPL_USAGE,1914718,01/Sep/2017 20:02:03,01/Sep/2017 20:02:03
CONTRACT_MSISDN,3785568,01/Sep/2017 04:00:26,01/Sep/2017 04:00:26
Table OCS_OFFER_CONF_2,16838060,01/Sep/2017 09:30:03,01/Sep/2017 09:30:03
Table OCS_OFFER_STATE_2,12902213,01/Sep/2017 09:30:03,01/Sep/2017 09:30:03
Table OCS_STATIC_2,5094735,01/Sep/2017 09:30:03,01/Sep/2017 09:30:03
Table FC_SAPIST_ALL_ITEMS,4579021,01/Sep/2017 02:40:54,01/Sep/2017 02:40:54
Table FC_SAPIST_OPEN_ITEMS,653676,01/Sep/2017 00:30:05,01/Sep/2017 00:30:05
Table FC_SAPIST_DY_ALL,993408,01/Sep/2017 12:46:46,01/Sep/2017 12:46:46
Table SC_LOAN_OVERVIEW_FACT_II,1392218,01/Sep/2017 08:10:31,01/Sep/2017 08:10:31
PPL_USAGE,21397132,01/Sep/2017 06:19:27,01/Sep/2017 06:19:27
PPL_USAGE,20339944,01/Sep/2017 10:20:16,01/Sep/2017 10:20:16
Table PPL_CH_USAGE,178,01/Sep/2017 09:03:30,01/Sep/2017 09:03:30

为了将它们加载到 oracle 表中,如何删除“Table”一词及其后的空格?

例如,所需的输出将是:

PPL_CH_USAGE,178,01/Sep/2017 09:03:30,01/Sep/2017 09:03:30
PPL_INVOICE,22015731,01/Sep/2017 05:30:21,01/Sep/2017 05:30:21
PPL_LIABILITY,2468705,01/Sep/2017 06:56:41,01/Sep/2017 06:56:41
MBBSCS_PPL_INVOICE,3768639,01/Sep/2017 07:00:15,01/Sep/2017 07:00:15
MBBSCS_PPL_USAGE,1914718,01/Sep/2017 20:02:03,01/Sep/2017 20:02:03
CONTRACT_MSISDN,3785568,01/Sep/2017 04:00:26,01/Sep/2017 04:00:26
OCS_OFFER_CONF_2,16838060,01/Sep/2017 09:30:03,01/Sep/2017 09:30:03
OCS_OFFER_STATE_2,12902213,01/Sep/2017 09:30:03,01/Sep/2017 09:30:03
FC_SAPIST_DY_ALL,993408,01/Sep/2017 12:46:46,01/Sep/2017 12:46:46
OCS_STATIC_2,5094735,01/Sep/2017 09:30:03,01/Sep/2017 09:30:03
FC_SAPIST_ALL_ITEMS,4579021,01/Sep/2017 02:40:54,01/Sep/2017 02:40:54
FC_SAPIST_OPEN_ITEMS,653676,01/Sep/2017 00:30:05,01/Sep/2017 00:30:05
SC_LOAN_OVERVIEW_FACT_II,1392218,01/Sep/2017 08:10:31,01/Sep/2017 08:10:31
PPL_USAGE,21397132,01/Sep/2017 06:19:27,01/Sep/2017 06:19:27
PPL_USAGE,20339944,01/Sep/2017 10:20:16,01/Sep/2017 10:20:16
PPL_CH_USAGE,178,01/Sep/2017 09:03:30,01/Sep/2017 09:03:30

请帮助我:)

非常感谢!

最佳答案

sed 's/^Table //g' -i to_load_pplp.csv

s代表替换,-i选项替换文件。

关于mysql - sed 从 .csv 中删除单词 + 空格 |优尼克斯 |太阳系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46078211/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com