我有以下格式的以下文件:
@H_301_17@$ls CombinedReports_LLL-*'('*.csv CombinedReports_LLL-20140211144020(Untitled_1).csv CombinedReports_LLL-20140211144020(Untitled_11).csv CombinedReports_LLL-20140211144020(Untitled_110).csv CombinedReports_LLL-20140211144020(Untitled_111).csv CombinedReports_LLL-20140211144020(Untitled_12).csv CombinedReports_LLL-20140211144020(Untitled_13).csv CombinedReports_LLL-20140211144020(Untitled_14).csv CombinedReports_LLL-20140211144020(Untitled_15).csv CombinedReports_LLL-20140211144020(Untitled_16).csv CombinedReports_LLL-20140211144020(Untitled_17).csv CombinedReports_LLL-20140211144020(Untitled_18).csv CombinedReports_LLL-20140211144020(Untitled_19).csv
我想删除这部分:
20140211144020(这是报告运行的时间戳,因此会有所不同)
并最终得到类似的东西:
CombinedReports_LLL-(Untitled_1).csv CombinedReports_LLL-(Untitled_11).csv CombinedReports_LLL-(Untitled_110).csv CombinedReports_LLL-(Untitled_111).csv CombinedReports_LLL-(Untitled_12).csv CombinedReports_LLL-(Untitled_13).csv CombinedReports_LLL-(Untitled_14).csv CombinedReports_LLL-(Untitled_15).csv CombinedReports_LLL-(Untitled_16).csv CombinedReports_LLL-(Untitled_17).csv CombinedReports_LLL-(Untitled_18).csv CombinedReports_LLL-(Untitled_19).csv
我只是按照mv命令的思路思考,可能是这样的:
$ls CombinedReports_LLL-*'('*.csv
但也许sed命令或其他更好