1

I have a shell/bash CGI script which calls a perl script in the background and prints the output of the perl script to the bash html page.

Everything is working well, except that it's printing all of the output in a single line.

If I run the same script via command prompt with proper indent and "\n" everything is working.

I change the print to sprintf but with no help.

Any thoughts?

1 Answer 1

2

If the output is to be included in a web page, you should include it in a <pre>/</pre> pair (preformatted text).

Or you should print out a <br> instead of \n.

Sign up to request clarification or add additional context in comments.

1 Comment

...do you mean I wil have to change it to CGI ??? Do u got any sample code how to change \n to <br> ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.