Question

For the listing below, I get an error:

fatal: function name `myprint' previously defined

$3 > 0     { myprint ($3) }

function myprint(num)
{
    printf "%6.3g\n", num
}
Was it helpful?

Solution

I discovered that I had an extra space after the call and between the parameters:

myprint ($3)

should be:

myprint($3)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top