When you run it via a browser, does your script return "Hello, World!" to the browser, and does the file "/tmp/ac.txt" contain what you expected? Do you see the word "HI"? What does that file contain (what is the expected output from "autostatus -J aa-test-bx-dly")?
in reply to Help required for CGI Script
in thread CGI Script Working fine from my command prompt but Shows Internal server error when called through browser
Since you are using "fatalsToBrowser", are you seeing any error messages? What do they say?
Your code only tries to print the first line of "/tmp/ac.txt" to the browser, but if the output begins with a blank line, that's all your program will send to the browser.
If the autostatus output contains angle brackets, then your browser will be trying to interpret it as HTML tags, and will probably not display any of it (because the data can't be parsed that way). In order to see the "autostatus" output presented, you may have to print a <pre> tag before printing the command output, and then print a </pre> tag afterwards.