LinuxUser2008 has asked for the wisdom of the Perl Monks concerning the following question:
############################################################ #myShell.sh ############################################################ #!Perl_Interpreter_Location print "This is the list of files in ur current dir\n"; `ls -al`; print "End Of Script\n";
Now, this would execute the script, but unfortunately all the new-lines get replaced by a blank space..I tried executing with $().. But, it throws Compilation errors..############################################################ #myCGI.cgi ############################################################ #!Perl_Interpreter Location Line 1 : print ”Content-Type : html/text ”; Line 2 : print “<HTML>”; Line 3 : print “<BODY>”; Line 4 : print ` etc/webtop/cgi-bin/myShell.sh ` Line 5 : print “</BODY>”; Line 6 : print “</HTML>”;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Missing new-lines, when script executed in a CGI
by JavaFan (Canon) on May 11, 2010 at 14:03 UTC | |
by LinuxUser2008 (Acolyte) on May 11, 2010 at 15:40 UTC | |
by JavaFan (Canon) on May 11, 2010 at 22:20 UTC | |
|
Re: Missing new-lines, when script executed in a CGI
by Anonymous Monk on May 11, 2010 at 14:32 UTC | |
by LinuxUser2008 (Acolyte) on May 11, 2010 at 16:21 UTC |