25

In the Apache httpd project's "support/apxs.in" script, a text surrounded with @ signs comes after #!. That is, the first line of the script is:

#!@perlbin@ -w

Is this a Perl thing or a UNIX kernel thing? In other words, it it possible to execute this script using path/to/script/script_name.in?

If not, then what is the reason to start the script with a #!?

  • 8
    those are .in files (i.e. templates) – don_crissti Feb 2 '17 at 18:50
  • 2
    As a side note, @ is fine in filenames so if you have an executable called @perlbin@ which accepts the -w option and is able to interpret the contents of that file, then yes you can run that file. – Bakuriu Feb 3 '17 at 13:05
  • @Bakuriu: "Valid", yes. "Fine"? Dubious. – Lightness Races in Orbit Feb 3 '17 at 17:23
47

This looks like a placeholder in an GNU Automake template which is going to be filled in by a configure script. So it's neither a Perl or Unix kernel thing, but a GNU autotools thing.

It is probably from a file in a source distribution, not from a file that was installed on the system through make install or a package manager.

Alternatively, it's from a broken build with GNU autotools that never defined perlbin properly.

That the file has a .in suffix confirms that it is supposed to be processed by configure.

No, you can not execute this file as it is. The placeholder will be replaced with the proper path to the perl executable when you run configure.

  • Yeah the link in the question leads to a source code repository. – Lightness Races in Orbit Feb 3 '17 at 17:22
  • @LightnessRacesinOrbit You know what, I didn't even see that there was a link there. – Kusalananda Feb 3 '17 at 17:24
  • 1
    Hehe I thought that may have been the case. I have suggested an edit that fixes a couple of problems with it, this being one of them :) – Lightness Races in Orbit Feb 3 '17 at 17:29
  • 1
    Seems like a problem with the styling of Unix.SE -- the link color isn't very distinct from the normal text color. – Barmar Feb 8 '17 at 18:56
  • 1
    meta question about link color – Barmar Feb 8 '17 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.