ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The contents of the log does display however all the lines wrap around making it unreadable. Is there a way to display all the carriage returns of the log file via html? Thanks.
I have one more question. I'm trying to setup a simple cgi script in perl that will scp some files when it's being called on via the web. For example, http://serverA/cgi-bin/scp.pl, will then run my perl script. The code is simple:
However, nothing prints on screen and my file never gets scp'd over. BUT, if I wrote this in a bash script, it works just fine. What's wrong with my perl syntax?
I'm a bit confused about that last post. The link that you posted seems to point to a holding URL that is for sale. That aside, are you saying that you have one script calling another script? Also, I'm confused about your reference to running a bash script and seeing output on your console. If you run a script that writes to standard output as a CGI, the standard output goes to the HTTP socket that is opened by the HTTP server. That's the whole essence of how CGI works. There are some differences between the contexts of running any script, bash, perl, whatever, as an ordinary user from the commandline, and as the user that the web server runs as in the CGI context. One difference is the permissions normally assigned to the cgi-bin directory. As a CGI, your script is trying to write to the cgi-bin directory, which the web server should not have write access to (a fundamental security issue).
Please clarify what you are seeing (or not seeing), in both the test and production situations.
Okay, re-examining your question, I think I see what you may be questioning. You are printing the first line of the HTTP header, but the rest of the HTML is missing. You should probably create a proper HTML page with the <html> <head></head> <body> </body> </html> components. Some confirmation message in the body would be good, too.
I assume you have arranged ssh keys to permit paswordless secure copies.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.