New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

OS 10.4 - Shell Broken ?

Post Reply New Thread Subscribe

Thread Tools
Posts: n/a

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:
echo Content-Type: text/html
echo Hello!
It failed. Same header error. But the same script works on my Linux. So I ran the script in the Terminal. The output: :/

$ sh
echoent-Type: text/html
Why does it look like that :/ On my Linux I get:
$ sh
Content-Type: text/html

Any ideas ?

QUOTE Thanks

Hikaru79's Avatar
Member Since: Aug 04, 2006
Location: Windsor, Ontario (Canada)
Posts: 47
Hikaru79 is on a distinguished road
Mac Specs: 2.16 Ghz MacbookPro, 1GB RAM, Radeon X1600, 100GB Hard Disk

Hikaru79 is offline
I don't know what is wrong, but I can confirm that something is wrong.
adrian-petrescus-computer:~ adrianpetrescu$ vim
adrian-petrescus-computer:~ adrianpetrescu$ chmod a+x 
adrian-petrescus-computer:~ adrianpetrescu$ ./ 
Content-Type: text/html

The same script works fine for me. Sorry...
QUOTE Thanks
Posts: n/a

So is there anything I can do about it :/ ?
QUOTE Thanks

rman's Avatar
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,584
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
I don't know about everyone else, but this is the way I would write it.

echo "Content-Type: text/html\n"
echo "Hello!"

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks

Post Reply New Thread Subscribe

« Replacing files within a folder, rather than the entire folder | Annoying download box in OS X 10.4 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
OS X Tiger shell vs RedHat Fedora Linux shell? AlexN OS X - Operating System 2 09-17-2005 07:08 PM
Replace broken hinge rman Apple Notebooks 2 01-07-2005 07:11 PM
looking for a terminal emulator and command shell in Mac OSX CandiMarie OS X - Operating System 9 03-05-2004 03:53 PM
connecting to AOL without the AOL shell? newteech Running Windows (or anything else) on your Mac 0 12-26-2003 08:54 PM

All times are GMT -4. The time now is 02:27 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?