Search Results

Search found 47 results on 2 pages for 'shebang'.

Page 1/2 | 1 2  | Next Page >

  • Portable shebang line

    - by Mike
    #!/usr/bin/perl This is the shebang line to a lot of scripts I'm writing lately. Hard coding the path of the binary seems like it could create some problems. For instance, if one of my users has Perl installed at /something_else/bin then they'd have to change all the shebangs. I've seen some tools that will automatically replace the shebangs, but I'm wondering if there is something simpler.

    Read the article

  • What's the shebang in Facebook URLs for?

    - by BoltClock
    I've just noticed that the long, convoluted Facebook URLs that we're used to now look like this: http://www.facebook.com/example.profile#!/pages/Some-Other-Page/123456789012345 As far as I can recall, earlier this year it was just a normal URL-fragment-like string (starting with #), without the exclamation mark. But now it's a shebang (#!), which I've previously only seen in shell scripts and Perl scripts. Does #! now play some special role in URLs, like for a certain Ajax framework or something since Facebook's interface is now largely Ajaxified? Or is it for some other purpose?

    Read the article

  • Rubygame on OS X shebang problem

    - by Mk12
    I'm playing around with Rubygame. I installed it with the Mac Pack, and now I have the rsdl executable. rsdl game.rb works fine, but when I chmod +x the rb file, add the shebang to rsdl (tried direct path and /usr/bin/env rsdl) and try to execute it (./game.rb), it starts to flicker between the Terminal and rsdl which is trying to open, and eventually gives up and gives a bus error. Anyone know what's causing that? I'm on Snow Leopard (10.6.2) if it makes a difference. Thanks.

    Read the article

  • What is the better Shebang Line to use ?

    - by Anonymous
    What is better/faster to use: #! perl or #! perl.exe or #! fullpath/perl(/perl.exe) or #! partialpath/perl(/perl.exe) ? And, when using "#! perl", when it works on a particular system, what is the print() for showing the full path to perl.exe, that could be included into the Shebang Line ? And, if using a /path/path/perl, are "*" or "..." allowed to be used for the folders ?

    Read the article

  • How do I ignore the Perl shebang on Windows with Apache 2?

    - by nbolton
    I have set up a local Perl web environment on my Windows machine. The application I'm working on is originally from a Linux server, and so the shebang for source .pl files look like so: #!/usr/bin/perl This causes the following error on my Windows dev machine: (OS 2)The system cannot find the file specified. Is it possible to change my Apache 2 conf so that the shebang is ignored on my Windows machine? Of course I could set the shebang to #!c:\perl\bin\perl.exe, that much is obvious; but the problem comes to deploying the updated files. Clearly it would be very inconvenient to change this back on each deploy. I am using ActivePerl on Windows 7. Update: I should have mentioned that I need to keep the shebang so that the scripts will work on our shared hosting Linux production server. If I did not have this constraint and I didn't have to use the shebang, the obvious answer would be to just not use it.

    Read the article

  • What should I use for a Perl script's shebang line?

    - by Anonymous
    Which of these is better or faster to use as the shebang line for a Perl script? #! perl #! perl.exe #! fullpath/perl(/perl.exe) #! partialpath/perl(/perl.exe) And, when using #!perl, when it works on a particular system, how do I find out in the script which perl interpreter I'm using so I can put that one into the shebang line? And, if using a /path/path/perl, are "*" or "..." allowed to be used for the folders?

    Read the article

  • Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

    - by codykrieger
    Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart to manage a Rails app's Unicorn master process. Here is my current /etc/init/app.conf: description "app" start on runlevel [2] stop on runlevel [016] console owner # expect daemon script APP_ROOT=/home/deploy/app PATH=/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$PATH $APP_ROOT/bin/unicorn -c $APP_ROOT/config/unicorn.rb -E production # >> /tmp/upstart.log 2>&1 end script # respawn That works just fine - the Unicorns start up great. What's not great is that the PID detected is not of the Unicorn master, it's of an sh process. That in and of itself isn't so bad, either - if I wasn't using the automagical Unicorn zero-downtime deployment strategy. Because shortly after I send -USR2 to my Unicorn master, a new master spawns up, and the old one dies...and so does the sh process. So Upstart thinks my job has died, and I can no longer restart it with restart or stop it with stop if I want. I've played around with the config file, trying to add -D to the Unicorn line (like this: $APP_ROOT/bin/unicorn -c $APP_ROOT/config/unicorn.rb -E production -D) to daemonize Unicorn, and I added the expect daemon line, but that didn't work either. I've tried expect fork as well. Various combinations of all of those things can cause start and stop to hang, and then Upstart gets really confused about the state of the job. Then I have to restart the machine to fix it. I think Upstart is having problems detecting when/if Unicorn is forking because I'm using rbenv + the ruby-local-exec shebang in my $APP_ROOT/bin/unicorn script. Here it is: #!/usr/bin/env ruby-local-exec # # This file was generated by Bundler. # # The application 'unicorn' is installed as part of a gem, and # this file is here to facilitate running it. # require 'pathname' ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath) require 'rubygems' require 'bundler/setup' load Gem.bin_path('unicorn', 'unicorn') Additionally, the ruby-local-exec script looks like this: #!/usr/bin/env bash # # `ruby-local-exec` is a drop-in replacement for the standard Ruby # shebang line: # # #!/usr/bin/env ruby-local-exec # # Use it for scripts inside a project with an `.rbenv-version` # file. When you run the scripts, they'll use the project-specified # Ruby version, regardless of what directory they're run from. Useful # for e.g. running project tasks in cron scripts without needing to # `cd` into the project first. set -e export RBENV_DIR="${1%/*}" exec ruby "$@" So there's an exec in there that I'm worried about. It fires up a Ruby process, which fires up Unicorn, which may or may not daemonize itself, which all happens from an sh process in the first place...which makes me seriously doubt the ability of Upstart to track all of this nonsense. Is what I'm trying to do even possible? From what I understand, the expect stanza in Upstart can only be told (via daemon or fork) to expect a maximum of two forks.

    Read the article

  • custom sorting or ordering a table without resorting the whole shebang

    - by fuugus
    for ten years we've been using the same custom sorting on our tables, i'm wondering if there is another solution which involves fewer updates, especially since today we'd like to have a replication/publication date and would'nt like to have our replication replicate unnecessary entries. i had a look into nested sets, but it does'nt seem to do the job for us. base table: id | a_sort ---+------- 1 10 2 20 3 30 after inserting insert into table (a_sort) values(15) an entry at the second position. id | a_sort ---+------- 1 10 2 20 3 30 4 15 ordering the table with select * from table order by a_sort and resorting all the a_sort entries, updating at least id=(2,3,4) will of course produce the desired output id | a_sort ---+------- 1 10 4 20 2 30 3 40 the column names, the column count, datatypes, a possible join, possible triggers or the way the resorting is done is/are irrelevant to the problem. also we've found some pretty neat ways to do this task fast. only; how the heck can we reduce the updates in the db to 1 or 2 max. seems like an awfully common problem. the captain obvious in me thougth once "use an a_sort float(53), insert using a fixed value of ordervaluefirstentry+abs(ordervaluefirstentry-ordervaluenextentry)/2".. but this would only allow around 1040 "in between" entries - so never resorting seems a bit problematic ;)

    Read the article

  • Default shell for running scripts (w/o shebang) in macos?

    - by Igor Spasic
    I have ZSH as default shell in MacOS, everything is working fine. ZSH is installed as brew package, Ive set default shell in my account, new shell is listed in /etc/shells... everything is set, like I've said. I have some shell scripts in which I use some commands from zsh, like print. When I execute the script from command line, the print command is not recognized and the script fails. This script does not have the shebang line. When I put the shebang line for zsh, then everything works; the print command is working. Since I am using only ZSH, is it possible to set default shell for running scripts, so I don't have to put shebang line in my .zsh scripts? Or is it possible to associate .zsh extension to ZSH shell execution?

    Read the article

  • How does the #! work?

    - by mocybin
    In a script you must include a #! on the first line followed by the path to the program that will execute the script (e.g.: sh, perl). As far as I know though, the # character denotes the start of a comment and that line is supposed to be ignored by the program executing the script. It would seem though, that this first line is at some point read by something in order for the script to be executed by the proper program. Could somebody please shed more light on the workings of the #! ? Edit: I'm really curious about this, so the more in-depth the answer the better.

    Read the article

  • Writing my first bash script (line 2: testscript: No such file or directory)

    - by skyeagle
    I am attempting to write my first shell script (I'm running Ubuntu 10.x) This is what my 'script' looks like cd /path/to/directory/cronscripts . testscript I put the following debug statements (after the cd), in the script above to make sure everything was ok: pwd echo `ls -lhrt` and it displayed all the files in the directory. So I dont understand the error message I am getting. I have the following two questions Why am I getting the above error message and how do I fix it? My script seems to run fine without a shebang in the first line - infact when I try either of the following: #!/usr/bin/bash #!/usr/bin/bash env I get the following error message: /usr/bin/bash: bad interpreter: No such file or directory What is the purpose of the shebang statement and why do I get the above error when I try to include it in my script/ how do I fix it, so I can add the shebang (is it necessary? - it seems most script examples have the shebang - but I'm not sure if it is a must, as the script runs without it).

    Read the article

  • /usr/bin/python Replacement

    - by tikiking1
    If I've changed the target of /usr/bin/python from /usr/bin/python2.7 to /usr/bin/python3.2 (I realize this was an ABSOUTELY HORRIBLE idea) in Ubuntu 12.04.1 LTS. Afterwards, several applications, including software-center and update-manager have stopped working. Insofar as I can tell, this is because they are written in Python2.7. I replaced the default /usr/bin/python shebang with the 2.7 one, and this fixes them on the application level. Switching /usr/bin/python back to /usr/bin/python2.7 really isn't an option, but is there a list of all applications installed by default in Ubuntu 12.04.1 LTS, if installed from a new CD-R, that use a shebang of #!/usr/bin/python instead of #!/usr/bin/pythonX.Y?

    Read the article

  • Fallback Mode on Intel HD 4000 on Ubuntu 12.04.1?

    - by caragh
    Just built a system w/ a ivy bridge CPU (Xeon E3-1245 v2) with Intel HD 4000 onboard graphics, board is an Asrock H77 ProM. I had loaded Ubuntu server 12.04.1 onto it, but wanted to fool around w/ gnome 3. I installed gnome-shell, which didn't work, then gnome, which did, but only loads on fallback mode - the video is recognized as "VESA: sandy/ivy bridge graphics" I tried installing the whole ubuntu-desktop shebang but it's still in fallback graphics. Any way to get the full eye candy?

    Read the article

  • How to make a disk image and restore from it later?

    - by Torben Gundtofte-Bruun
    I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, resolution, etc.) I've broken something (X, grub, unknowns) and I can't get it back to work. Especially for a newbie like me, it's easier (and much faster) to just reinstall the whole shebang than try to troubleshoot several layers of failed "fixing" attempts. Coming from Windows, I expect that there is some "disk image" utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot. What's the Linux equivalent of Windows disk imagers like Acronis True Image or Norton Ghost? Note: I found a similar question here.

    Read the article

  • How to make a disk image and restore from it later?

    - by torbengb
    I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, resolution, etc.) I've broken something (X, grub, unknowns) and I can't get it back to work. Especially for a newbie like me, it's easier (and much faster) to just reinstall the whole shebang than try to troubleshoot several layers of failed "fixing" attempts. Coming from Windows, I expect that there is some "disk image" utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot. What's the Linux equivalent of Windows disk imagers like Acronis True Image or Norton Ghost?

    Read the article

  • How to "back track"?

    - by esqew
    I find that I start projects and, due to my lack of experience, find that old database structures and huge blocks of code are inefficient and memory-costly. However, by the time I realize a re-design of the entire project is needed, the project has grown to such a size that it is simply too late to go back and modify the project in its current state and requires a completely new project file and the whole shebang. How should I prevent ruts such as this one, where it is too late to go back and modify the current project to fit specifications modified far down the road from the creation of the project? (Apologies in advance for confusing grammar, it's been a long day here... as you can probably tell.)

    Read the article

  • How to host a simple website using a domain name I own

    - by Cedric Martin
    I'm familiar with hosting webapps when I'm doing "the whole shebang" of installing / configuring / setting up Apache/Tomcat/PostreSQL / "coding" the website myself using HTML / JSP / CSS etc. on dedicated servers I'm renting. But in the above case, I'm "owning" the entire stack: from the Debian GNU/Linux dedicated servers to every single file that is served. Now I'd like to do something much simpler and I must admit I don't know what's involved at all. I'd like to host a simple website made of only a few static pages (no database, no nothing) and I'd like it to be accessible from "example.com". What needs to be technically done to have such a thing? How is the DNS supposed to be set up? Note that I do not want to host this on one of my dedicated servers.

    Read the article

  • Pronunciation in programming?

    - by Xepoch
    How do you correctly or erroneously pronounce programming terms? Any that you find need strict correction or history into the early CS culture? Programming char = "tchar" not care? ! = bang not exclamation? # = pound not hash? Exception #! = shebang * = splat not star? regex = "rej ex" not "regg ex"? sql = "s q l" not "sequel" (already answered, just i.e.) Unixen | = pipe not vertical bar? bin = bin as in pin , not as in binary? lib = lib as in library , not as in liberate? etc = "ett see" , not "e t c" (as in /etc and not "&c") Annoyance / = slash not backslash LaTeX = "laytek" not "lay teks"

    Read the article

  • Let apache run perlscripts that don't have an extension

    - by tiMbeRdroP
    I'd like to use perlscripts without their extension. f.e. "index" instead of "index.pl". Changing the DefaultType-directive from text/plain to application/x-perl didn't do the trick. Instead of running the script the server offered to download its source. I'm not exactly sure if changing this directive is the right approach. Telling apache to read the shebang-line when there is no extension sounds much better to me. I hope someone with more experience on this topic can help me out.

    Read the article

  • Unable to connect with IIS7 Manager to remote site

    - by saifkhan
    I was unable to connect with IIS7 manager to a remote site. I got on the phone with the hosting provider and they started troubleshooting. After a few minutes they went over all my settings, username, password...the whole shebang and I still couldn't. I then asked the support tech if any ports needed to be opened on my side and she said "ONLY PORT 80 NEEDS TO BE OPENED"... after a few more mins I decided to hop over to the IIS7 website but still couldn't find anything incicating specific ports, but I did came across a doc mentioning 8172 as a port IIS7 uses so I went to my firewall did the following OPEN PORT 8172 OUTBOUND That did the trick!...and the support tech updated her document accordingly.

    Read the article

  • Is the use of hashbang really a good idea? [on hold]

    - by user32642
    I've been working on a WordPress site lately that was design with hashbang or shebang in the dynamically generated URLs. After doing some research, I noticed that there was some preference by Google in their use and how it crawled the site. However, after I ran several sitemap generators and Screaming Frog SEO Spider, I realized that the only page being crawled was the index page. So now I am questioning the use of hashbangs. What do you think? Should I attempt to remove them? Or will it even matter? And does anyone know of a easy way to remove this? The site is www.modernvintage1005.com

    Read the article

  • How to force emacs to use \n instead of \r\n

    - by User1
    I have to use windows to write some shell scripts. I decided to use emacs, but I get a weird error when running the script: /bin/bash^M: bad interpreter: No such file or directory Correct me if I'm wrong, but that looks like the shebang ends in \r\n instead of just \n. How can I tell emacs to only write \n? I'm in Shell-script major mode. It's quite surprising this isn't fixed by default.

    Read the article

1 2  | Next Page >