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
1 answer

Script using rvm ruby-2.1.2 but console using rvm jruby-1.7.12. Script failed

All, I don't think it has been asked after scout through the question here. Here are my problem: I'm using Ubuntu 14.04. I've developed a script to be run by ruby-2.1.2. I've included the shebang line #!/usr/bin/env ruby in the script header and…
Chris Liaw
  • 67
  • 2
  • 9
0
votes
1 answer

Package changes ignored when executing modular/multi-file scala as a shell script

When I have a scala program as a shell script that pulls from a package, if I modify that package, the shell script can't see the changes, even though I recompiled. Here is a very simple example: one.scala: package myPackage object one { val value…
John Arrowwood
  • 2,370
  • 2
  • 21
  • 32
0
votes
1 answer

good practise to handle composer, shebang and self-compiled php-versions?

I've started a new project in which I like to used the current version of PHP (5.5.12). I compiled this version myself because the version of my distro is 5.3. I need propel ORM so I installed it via composer. Now, the propel-script uses this…
32bitfloat
  • 751
  • 2
  • 8
  • 21
0
votes
1 answer

Run Python Script in Python 2.7 And Not 2.6

I am attempting to execute my script (on my Dreamhost server) with Python 2.7. Currently when I access my script it is run by Dreamhost's default version of Python 2.6.6. I have attempted to make sure the script is run under Python 2.7 using this…
Mack
  • 593
  • 1
  • 5
  • 7
0
votes
1 answer

Print in new line in a file using shebang script

i have below code to print the QUERY_STRING data to text file in new line #!/bin/sh echo "Content-type: text/html" echo "" read QUERY_STRING echo $QUERY_STRING > /test eval $(echo…
sree
  • 121
  • 1
  • 18
0
votes
2 answers

Making perl scripts executable... can I do away with the preceding 'perl' statement?

This is a pretty simple one... I just want to make a perl script executable without the preceding perl command, and instead let the environment deduce the interpreter from the shebang line. Here is my sample script called test: #!/usr/bin/perl print…
jake9115
  • 3,964
  • 12
  • 49
  • 78
0
votes
2 answers

Perl - edit in Windows but run directly on Unix shell?

I write my Perl code in Textpad (which I believe is only avai in Windows). I run it on Linux cmd prompt by calling the Perl interpreter explicitly, e.g. "perl script.pl". I was wondering if it's possible to run it simply as in "./script.pl". When…
PJx
  • 1,043
  • 1
  • 9
  • 10
0
votes
1 answer

erl_tidy cannot determine module name for escript

I want use erl_tidy to format erlang code, including escript files. But this comes out when I format one escript file (source) after adding -module(erl_pprint). : 1> erl_tidy:file("erl_pprint"). erl_pprint: error: cannot determine module name. **…
schemacs
  • 2,783
  • 8
  • 35
  • 53
0
votes
1 answer

configure php to recognize shebang by require

I want to do something like that in php (running on apache2): require("somecgi.py") where somecgi.py is a python file with a valid shebang. My apache is configured to execute the cgi-script when opened directly in brower. But i can't bring php to…
Kritzefitz
  • 2,644
  • 1
  • 20
  • 35
0
votes
1 answer

Perl 'hello world' doesn't work when shebang line present (Windows)

I'm running ActiveState Perl 5.10.1 on Windows XP. The following program executes, but produces no output at the command line: #!c:/perl/bin/perl.exe use strict; use warnings; print "foo\n"; If I remove the shebang line, I get 'foo' shown as the…
0
votes
1 answer

Shebang line in script on NFS mount on Linux client doesn't seem to work

Here is our test script... #!/bin/bash echo "Hello World" It is on an NFS share that is mounted on a Linux client. If we call the script like this: ./testscript.sh then we get this: sh: ./testscript.sh: Permission denied If we call it like…
byumark
  • 298
  • 1
  • 6
0
votes
3 answers

Using gcc to compile a C program

I am following an example from CUNY and I have never done anything with C before so I probably don't know what I am doing. Consider the program below. Do I need a shebang line for C code written in emacs? When I go to compile using the line gcc -g…
dustin
  • 4,309
  • 12
  • 57
  • 79
0
votes
0 answers

How to write a Python interpreter for script that can use a shebang to load the interpreter

I have simple script interpreter written in Python that processes a script written in a text file. I can refer to the interpreter using a shebang at the top of the script so that I can then execute the script directly. The interpreter has some logic…
starfry
  • 9,273
  • 7
  • 66
  • 96
0
votes
1 answer

Reliable way to find out which ruby to use in shebang

I wrote a script todo.rb, whose first line is #!/usr/bin/env ruby. However, running this script gives the following error: λ ~/ ruby todo/todo.rb /Users/xjia/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in…
Xiao Jia
  • 4,169
  • 2
  • 29
  • 47
0
votes
2 answers

Strange script behaviour when shebang references different shell

I've recently switched to the ksh93 shell. I did this by adding the following two lines to my .profile file export SHELL=/usr/local/bin/ksh93 exec $SHELL Since I did that some simple scripts have started misbehaving in a way I don't understand. I…
john
  • 7,897
  • 29
  • 27