Is it possible to use a string as a delimiter in unix cut command?

后端 未结 5 540
长发绾君心
长发绾君心 2021-02-07 04:18

If I want to cut a list of text using a string as a delimiter, is that possible? For example I have a directory where a list of shell scripts call same perl script say

5条回答
  •  不思量自难忘°
    2021-02-07 04:32

    Try using this.

    $grep abc.pl * | awk -F 'abc.pl' '{print $2}'
    

    -F fs --field-separator fs Use fs for the input field separator (the value of the FS predefined variable).

提交回复
热议问题