How can I parse a string using bash to get a number

后端 未结 3 1007
轻奢々
轻奢々 2021-01-28 07:51

I have the following string:

PR-1769|7bb12d4152a497cef491e0a1088b3984ad92972f|jaga|

How can I parse the string above using bash so that I get t

3条回答
  •  Happy的楠姐
    2021-01-28 08:33

    It could be done using awk:

    echo 'PR-1769|7bb12d4152a497cef491e0a1088b3984ad92972f|jaga|'|awk -F'|' '{print substr($1, 4)}'
    

提交回复
热议问题