为什么第 17 行不起作用(在代码中注释)?:
#!/bin/nawk -f
BEGIN {
print "<html>"
print "<body>"
print " <table border=2>"
print " <tr>"
print " <th>Name</th>"
print " <th>Username</th>"
print " <th>Email</th>"
print " </tr>"
}
{
print " <tr>"
print " <td>" $2 " " $1"</td>"
print " <td>"'{Substr($1,1,1)}' "</td>" ###### Line 17
is
print " <td>" $3 "</td>"
我可以在第 17 行写这样的声明吗?我试图得到名字的第一个字母。