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 |
|
Login |
|
|
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
|
|
|
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.
|
|
|
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 |
|
|
|