Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#17312 - [gawk] /usr/bin/awk link

Attached to Project: Arch Linux
Opened by Johan R (cleanrock) - Saturday, 28 November 2009, 20:54 GMT
Last edited by Allan McRae (Allan) - Tuesday, 05 July 2011, 07:00 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Paul Mattal (paul)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No


Some shell scripts (e.g. build scripts) start with
and fails on archlinux.

Perhaps an extra link /usr/bin/awk to /bin/gawk could be added.
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 05 July 2011, 07:00 GMT
Reason for closing:  Implemented
Additional comments about closing:  gawk-4.0.0-1 in [testing]
Comment by Glenn Matthys (RedShift) - Sunday, 29 November 2009, 18:51 GMT
Those scripts should be fixed, not add extra symlinks to the system.
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 30 November 2009, 01:49 GMT
/usr/bin/awk is the most common path for awk
Comment by Alessandro Doro (adoroo) - Tuesday, 01 December 2009, 16:00 GMT
Being gawk the only package providing awk in core/extra/community I favour for the link.
PS: I don't think the scripts should be fixed if they are generic awk script.
Comment by Gavin Bisesi (Daenyth) - Tuesday, 01 December 2009, 20:36 GMT
I agree with djgera and adoroo here. Plus, we do this for other packages (mlocate and vim off the top of my head).

It does seem though that changing them to #!/usr/bin/env awk would fix it
Comment by Allan McRae (Allan) - Saturday, 05 December 2009, 13:02 GMT
I'm not sure we should do this. As pointed out "#!/usr/bin/env awk" is the way to fix this. Also, it appears Debian does not do this, so those scripts are already widely broken (Fedora does link to /bin/awk, so still broken...)
Comment by Maik Beckmann (Salamander1978) - Saturday, 19 December 2009, 21:03 GMT
Allan, "#!/usr/bin/env awk" doesn't work, since awk defaults to stdin. In contrast perl, python and bash work fine, since they do expect a file by default.

Thus an executable awk script always starts with #!/usr/bin/awk -f
Comment by Johan R (cleanrock) - Tuesday, 29 December 2009, 07:07 GMT
I saw that mplayer-vdpau-nogui also suffers from this problem.
How about just adding an extra link (/usr/bin/awk) to the package ? This would make things less painful than having to add sed commands to packages.
Comment by Paul Mattal (paul) - Saturday, 06 March 2010, 20:13 GMT
What are the disadvantages to adding the symlink?

It sounds like /usr/bin/awk is a standard place to find awk, at least in some circles. It seems only to increase compatibility with those using that standard, and not getting in anyone else's way.

I guess I'll do this in a week or two if nobody objects.
Comment by Jonathan Liu (net147) - Sunday, 26 September 2010, 06:36 GMT Comment by Johan R (cleanrock) - Sunday, 26 September 2010, 08:41 GMT
Page actually says /usr/bin/awk should be a link to gawk.
Please dont forget to change this next time gawk is updated.
Comment by Johan R (cleanrock) - Sunday, 21 November 2010, 19:35 GMT
  • Field changed: Percent Complete (100% → 0%)
I dont see how 3.1.8-2 fixes this ticket, 3.1.8-2 do not contain /usr/bin/awk .
Comment by Allan McRae (Allan) - Sunday, 21 November 2010, 22:36 GMT
Given there is no standard here, we appear to have went the Fedora way and provided /bin/awk.

Honestly, there is nothing to convince me either is better... so we will probably leave this bug open for another year!
Comment by (Lavandero) - Monday, 06 December 2010, 09:02 GMT
port env from freebsd so that /usr/bin/env awk -f can be used
Comment by Rémy Oudompheng (remyoudompheng) - Monday, 13 June 2011, 11:18 GMT
You have to change operating systems to use more than one argument in shebang lines.