Anonymous user
Talk:Program name: Difference between revisions
→AWK
(The awk solution does not work for me) |
(→AWK) |
||
Line 34:
The awk solution does not work for me. I pasted the code into an executable script file test.awk as follows:
#!/usr/bin/awk
BEGIN {
"ls" | getline file
close("ls")
print "This file is " file
}
I then run my script test.awk as follows:
Line 50:
[[User:Markhobley|Markhobley]] 12:14, 6 September 2011 (UTC)
Ahhh, I fixed the hashbang:
#!/usr/bin/awk -f
It still didn't work though, because it gives the wrong filename:
$ ./test.awk
This file is keyring-QoRJiR
It should read "This file is test.awk".
[[User:Markhobley|Markhobley]] 12:17, 6 September 2011 (UTC)
|