Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

csh, bash & ksh output to -- echo "text\n"

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> csh, bash & ksh output to -- echo "text\n" Page: [1]
Login
Message << Older Topic   Newer Topic >>
csh, bash & ksh output to -- echo "text\n" - Jan. 23, '06, 6:07:47 PM   
jluis

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Hi,
This follows from a case where a sh script, that generates a header file (in GMT) behaves differently in SFU than on Macs and other *nixs

csh
echo "text\n"
text\n

bash
echo "text\n"
text\n

sh (Korn shell)
echo "text\n"
text

Why is answer within ksh different?

Thanks

Joaquim Luis
Post #: 1
RE: csh, bash & ksh output to -- echo "text\n" - Jan. 23, '06, 6:26:10 PM   
Rodney

 

Posts: 2949
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Because the o/p from ksh is matching the standard (POSIX.2) for echo.
The others are not. "/bin/echo" should give the correct response as well.
You should use "/bin/echo" in any scripts rather than the shell builtin for
maximal portability.

(in reply to jluis)
Post #: 2
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> csh, bash & ksh output to -- echo "text\n" Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031