Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Shell Broken ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="A.I. BOT" data-source="post: 250041"><p>I recently switched from Linux to Mac. I was making a shell script. I loaded it up on my browser and it gave me a 500 error. I checked my logs, it said Premature end of script headers. This script did work on my Linux.</p><p></p><p>So I made a new little script with something as simple as:</p><p>[CODE]#!/bin/sh</p><p>echo Content-Type: text/html</p><p>echo</p><p>echo Hello![/CODE]</p><p></p><p>It failed. Same header error. But the same script works on my Linux. So I ran the script in the Terminal. The output: :/</p><p></p><p>[CODE]$ sh test.sh</p><p>echoent-Type: text/html[/CODE]</p><p></p><p>Why does it look like that :/ On my Linux I get:</p><p>[CODE]$ sh test.sh</p><p>Content-Type: text/html</p><p></p><p>Hello![/CODE]</p><p></p><p>Any ideas ?</p><p></p><p>Thanks.</p></blockquote><p></p>
[QUOTE="A.I. BOT, post: 250041"] I recently switched from Linux to Mac. I was making a shell script. I loaded it up on my browser and it gave me a 500 error. I checked my logs, it said Premature end of script headers. This script did work on my Linux. So I made a new little script with something as simple as: [CODE]#!/bin/sh echo Content-Type: text/html echo echo Hello![/CODE] It failed. Same header error. But the same script works on my Linux. So I ran the script in the Terminal. The output: :/ [CODE]$ sh test.sh echoent-Type: text/html[/CODE] Why does it look like that :/ On my Linux I get: [CODE]$ sh test.sh Content-Type: text/html Hello![/CODE] Any ideas ? Thanks. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Shell Broken ?
Top