Talk:Program name: Difference between revisions

Content added Content deleted
m (moved Talk:Script name to Talk:Program name: task is not limited to scripts)
(The awk solution does not work for me)
Line 29: Line 29:
:::Now that you mention it, "Program name" sounds better. --[[User:Mwn3d|Mwn3d]] 02:59, 7 August 2011 (UTC)
:::Now that you mention it, "Program name" sounds better. --[[User:Mwn3d|Mwn3d]] 02:59, 7 August 2011 (UTC)
: This wiki likes "Names like this", but some other wikis like NamesLikeThis. So I am not surprised that some users create ScriptName or NamesLikeThis in this wiki. --[[User:Kernigh|Kernigh]] 01:39, 7 August 2011 (UTC)
: This wiki likes "Names like this", but some other wikis like NamesLikeThis. So I am not surprised that some users create ScriptName or NamesLikeThis in this wiki. --[[User:Kernigh|Kernigh]] 01:39, 7 August 2011 (UTC)

==AWK==

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:

./test.awk

This gives an error: awk: 1: unexpected character '.'

My awk interpreter is mawk, if that matters.

[[User:Markhobley|Markhobley]] 12:14, 6 September 2011 (UTC)