是否可以以某种方式在 AWK 中使用 bash 函数?
示例文件(字符串、整数、整数、整数)
Mike 247808 247809 247810
Run Code Online (Sandbox Code Playgroud)
尝试将值从十进制转换为十六进制。
.bashrc在 shell 脚本中或在 shell 脚本中定义的函数。
$ awk '{print $1 ; d2h($2)}' file
awk: calling undefined function d2h
input record number 1, file file
source line number 1
Run Code Online (Sandbox Code Playgroud)