📌  相关文章
📜  awk 匹配最后一次出现 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:45.358000             🧑  作者: Mango

代码示例1
You can use $NF with the command awk to get the last argument as follows:
awk -F 'delimiter' '{print $NF}'
And for getting penultimate or previous arguments type $(NF-n):
awk -F 'delimiter' '{print $(NF-1)}' #penultimate argument