【发布时间】:2020-07-06 06:00:26
【问题描述】:
我正在尝试从 800 行中获取最后一部分并使用 bash 将其保存到新文件中:
示例
framework/resources/Functional/tpcds/variants/json/q3_1.sql
metastore/scripts/upgrade/derby/hive-schema-1.3.0.derby.sql
coeus-db/coeus-db-sql/src/main/resources/co/kuali/coeus/data/migration/sql/mysql/rice_server/bootstrap/V400_002__KR_RICE_01_1.0.3.2-2.0.0_2010-04-15_B000.sql
sql/Updates/0.0.3/r1358_mangos.sql
coeus-db/coeus-db-sql/src/main/resources/co/kuali/coeus/data/migration/sql/mysql/kc/bootstrap/V521_047__KC_DML_01_KRACOEUS-7036_B000.sql
src/FrontEnd/db/1.x/1.1/src/02.functions-and-logic/office/office.get_office_name_by_id.sql
我希望输出是这样的
q3_1.sql
hive-schema-1.3.0.derby.sql
V521_047__KC_DML_01_KRACOEUS-7036_B000.sql
V400_002__KR_RICE_01_1.0.3.2-2.0.0_2010-04-15_B000.sql
V521_047__KC_DML_01_KRACOEUS-7036_B000.sql
office.get_office_name_by_id.sql
谁能告诉我如何使用 cut/grep 命令实现它?
【问题讨论】:
-
我没有看到这个问题与 PHP 无关。 .. 仍然可能给出一个想法!