The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
replace multiple lines in multiple files unihp1 Shell Programming and Scripting 1 09-21-2008 08:47 AM
Shebang msb65 Shell Programming and Scripting 9 09-17-2008 01:45 AM
Adding Multiple Lines to Multiple Files dayinthelife Shell Programming and Scripting 2 06-04-2008 11:50 AM
retrieved multiple lines on multiple places in a file dala Shell Programming and Scripting 8 03-14-2008 03:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-27-2009
sennex sennex is offline
Registered User
  
 

Join Date: Jan 2009
Location: at Work
Posts: 7
Multiple shebang lines

*** EDIT: I found something close to my solution under an IIS 7 Module Handle.*****


(Non-Homework question, simply an ease of use one)
Odd question here and maybe its my newness to cgi/Perl, but is it possible to have 2 shebang lines?

I write an test a ton of my homework code on my windows PC. (Vista 64, IIS 7) but when I upload I need to change the shebang line to a Linux format

Is it possible to have both running? or to trick out IIS 7 to think its Unix.

#!/usr/bin/perl
#!c:/perl64/bin/perl.exe


Its only 2 minutes worth of work, and I admit to being lazy.

Last edited by sennex; 01-27-2009 at 11:07 AM..
  #2 (permalink)  
Old 01-27-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,864
Sadly, not really. What you can do is to launch the program with the perl command. So if perl.bat is in your PATH on Windows and in your PATH on Unix (which it should always be), you can do:
Code:
perl path-to-myprogram/myprogram
To my knowledge, though, Windows doesn't really recognize the #! syntax (maybe they added it recently??) and Windows knows its a perl program because it has the .pl extension.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0