如何在搜索中使用awk变量?
Name="jony" awk -v name="$Name" '/name/ {print $0}' file
这将搜索字符串name,而不是$Name实际的字符串jony.
name
$Name
jony
shell awk
awk ×1
shell ×1