![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell and echo | replyramdas | Shell Programming and Scripting | 2 | 02-27-2008 03:40 AM |
| run a shell script with echo | keerthi | UNIX for Advanced & Expert Users | 7 | 06-21-2006 05:38 PM |
| FTP--How to use echo?? | rahul26 | UNIX for Advanced & Expert Users | 1 | 06-14-2006 09:47 AM |
| Echo escaped \c in SH Shell Any Idea | asami | Shell Programming and Scripting | 4 | 05-04-2006 07:24 AM |
| echo $SHELL, $PWD and etc. | yls177 | UNIX for Dummies Questions & Answers | 10 | 12-30-2002 10:04 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Echo with ksh shell
Hi All,
I'm trying to use the "echo" command in a korn shell script, and I want it to drop the trailing newline. Now I know that with the bash shell, the "-n" flag would solve this issue. Does anyone know how this can be done with the korn shell? Cheers Khoom |
|
|||||
|
In Korn, a simple option is to use print or printf.
Code:
print [ -Rnprsu[n ] ] [ arg ... ]
The shell output mechanism. With no flags or with flag -
or -, the arguments are printed on standard output as
described by echo(1). The exit status is 0, unless the
output file is not open for writing.
|
|
||||
|
I'd like to second reborg: for the umpteenth time now: if in ksh, use "print" AND NOT "echo"! "print" is a shell-built-in in ksh and therefore preferable over an external command like "echo".
bakunin |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|