Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In this 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 #!?

share|improve this question
3  
those are .in files (i.e. templates) – don_crissti 15 hours ago
up vote 22 down vote accepted

This looks like a placeholder in an GNU Automake template which is going to be filled in by a configure script.

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.

share|improve this answer

Those demarcation characters (@) are arbitrarily chosen and used for programmatic substitution. The portion of the shebang, @perlbin@, gets replaced with the path to PERL. Another program does this, perhaps with sed (but other software can be used as well). Another way to think of them is as a variable. A file like that is not meant to be invoked for execution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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