Questions tagged [shebang]

The #! marker at the beginning of scripts is called a shebang.

The #! marker at the beginning of scripts is called a shebang.

See

486 questions
0
votes
2 answers

(Ruby) is it possible for a shebang to have a "backup" version of ruby?

Let's say I have a shebang in a ruby script like this: #!/usr/local/rvm/rubies/ruby-2.0.0-p647/bin/ruby But the script is being run on four different servers and managed by one git repo (which I'd rather not branch ad infinitum). One of the…
Maxwell Evans
  • 127
  • 2
  • 10
0
votes
2 answers

Python: runtime shebang problems

Here is the problem I am trying to solve. I don't have a specific question in the title because I don't even know what I need. We have an ancient Hadoop computing cluster with a very old version of Python installed. What we have done is installed a…
Tommy
  • 12,588
  • 14
  • 59
  • 110
0
votes
2 answers

How do I change Korn(ksh) version dynamically based on platform?

I wanted to use the /usr/bin/ksh93 interpreter on AIX and Linux wherever possible but switch to /usr/bin/ksh where it's not applicable like Mac OS X and wanted the script to be universally compatible in unix. I don't think there is any fallback…
user1370642
  • 165
  • 1
  • 2
  • 13
0
votes
2 answers

Flask bad interpreter

Following this tutorial: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database I've reached the part where I'm supposed to create my first db and migrate it's tables. Having db_create.py, in the root directory of my xyzTest…
Alex
  • 7,538
  • 23
  • 84
  • 152
0
votes
1 answer

Invoke ruby script using shebang on linux and cmd / batch on windows

I believe I've seen some examples of this in projects I use but I can not find them at this time. What I have is a ruby project with a structure such as this: ~/projects/ruby/foo/bin bar.rb bar.cmd bar.sh My application sits entirely…
kwolfe
  • 1,663
  • 3
  • 17
  • 27
0
votes
1 answer

Escape a Shebang /#!/ in URL for Google URL Builder

Does anyone know if/how I can escape the shebang or encode the uri to make a link work properly in google analytics url builder? I want to add campaign parameters to product page urls to track ads success. The url for each individual product page…
Kimberly
  • 1
  • 1
0
votes
1 answer

escaped_fragment in sitemap or shebang?

My site is a Single Page Application and uses alot of javascript. I've got my server setup to generate the site the user sees with javascript so Google sees the same content. Google knows about this via the fragment meta tag and converts links with…
japrescott
  • 4,736
  • 3
  • 25
  • 37
0
votes
1 answer

How to make an executable file in Windows?

I'm following an expressJS tutorial and the instructor creates the following executable file: #!/usr/bin/env node var app = require('./../app'); var port = process.env.PORT || 3000; app.listen(port, function(){ console.log('Listening on port ' +…
newbie
  • 85
  • 1
  • 9
0
votes
1 answer

Usage of linux system variable in the shebang

i try to include an external user folder with perl scripts to my general perl script. How can i use the linux system variable user (${USER}) to include these scripts? I tried to add this variable simply to the first line of the script, but the…
chuhx
  • 334
  • 1
  • 3
  • 14
0
votes
0 answers

CR LF endline causes 500 error on Python script

I'm not sure if this is Apache, *nix, or Python, but for whatever reason, I'm getting a 500 error when I try to run a Python script on my remote server. I develop in Windows, so all my line endings have the standard CR LF (\r\n) line endings.…
David
  • 4,744
  • 5
  • 33
  • 64
0
votes
1 answer

Shebang won't work

I have written a small python script but bash won't execute it: #!/usr/bin/python ''' Created on Dec 19, 2014 ''' import subprocess if __name__ == '__main__': p = subprocess.Popen('df -h', stdout=subprocess.PIPE, stderr=subprocess.PIPE,…
abbas-h
  • 392
  • 1
  • 4
  • 18
0
votes
2 answers

How to feed contents of a "shebang" file into the program it invokes?

I want my program foo to take input from a shebang file. This file consists of the shebang line followed by some text: #!/usr/bin/env foo food_for_foo more_food_for_foo I want foo to read this text (ignoring the first line), and then go…
Joachim W
  • 7,290
  • 5
  • 31
  • 59
0
votes
1 answer

More precedence- Shebang line or perl command?

I have multiple Perl scripts where the shebang line is outdated. Thats is, shebang points to an older version of Perl. Old per path: #!/data/oracle10.0/perl/bin/perl The new version of Perl is in #!/data/**oracle11.0**/perl/bin/perl I have…
0
votes
2 answers

Running a script according to shebang line

I've got a script on my computer named test.py. What I've been doing so far to run the program is type python test.py into the terminal. Is there a command on Unix operating systems that doesn't require the user to specify the program he/she uses to…
loic17
  • 727
  • 6
  • 14
0
votes
1 answer

How to correctly execute a python script on the server?

I'm trying to execute my python script on the server. I use a hosting-company that allows me to do cronjobs. when i try to make the server execute the file i always get this error: command /homez.208/thomasdewh/www/denshi/denshi.py must be…
user3650471
  • 53
  • 1
  • 7