what is ksh equivalent of bash echo -n ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting what is ksh equivalent of bash echo -n ?
# 1  
Old 12-15-2006
what is ksh equivalent of bash echo -n ?

Hi folks,

I need to stop printing a new line after echoing a string in KSH. i know bash provides

echo -n "string"

what is the ksh equivalent for this ?
# 2  
Old 12-15-2006
Hi,

Use printf since echo -n isn't supported by ksh.

same arguments as with C
# 3  
Old 12-15-2006
Hi spare_ribs,

Thanks for the info. Yes i am able to get away with printf.
# 4  
Old 12-15-2006
Code:
 # echo "hello\c"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Bash statement equivalent

Hi all, i need a equivalent for the statement i run in bash, so it would also run in other shells. Specially i need it for ksh to run on AIX. Here the statements: exec > >(tee -a $log) exec 2> >(tee -a $log >&2) Thanks. (5 Replies)
Discussion started by: Kosak
5 Replies

2. Shell Programming and Scripting

Expect : what is the equivalent to ksh if -s

In Ksh to check if file exists and is non zero .. if ; then echo "Error $FILE does not exists!" else echo "$FILE found!" fi Cant seem to find the Expect equivalent .... Any help is greatly appreciated. (2 Replies)
Discussion started by: popeye
2 Replies

3. Shell Programming and Scripting

What is the ksh equivalent to bash's "history -c" command?

Hi, What is the korn shell equivalent of bash shell's "history -c" command? I do know, how to clear the history list in ksh, I can do the following: > ~/.sh_historybut still, I am interested to know the single one line command as 'history -c' gives error on my ksh (1 Reply)
Discussion started by: royalibrahim
1 Replies

4. Shell Programming and Scripting

ksh equivalent to >& in csh

In csh I am using >&. What is the equivalent in ksh?? >& - redirect stdout and stderr (csh,tcsh) (18 Replies)
Discussion started by: kristinu
18 Replies

5. Shell Programming and Scripting

Bash Script equivalent KSH script?

I always find BASH easier than ksh. At my home, i have written this bash script. I am finding it hard to write its equivalent in ksh, any suggestions? ###################################### #return seconds since `00:00:00 1970-01-01 UTC' (a GNU extension)... (1 Reply)
Discussion started by: boy18nj
1 Replies

6. Shell Programming and Scripting

equivalent of backspace in ksh

Hello All, What would be the equivalent of backspace key in the korn shell. My scenario is: I am trying to install a product..and it comes out with a Licence Agreement screen, When I manually enter backspace key..I am able to get out of the whole agreement message to a point to type Agree A) or... (2 Replies)
Discussion started by: solaix14
2 Replies

7. UNIX for Advanced & Expert Users

echo in ksh sh & bash

Hello, I have lib file which contain a function that get text to print on screen by echo command. Several scripts are inculde this lib and use this function. Each one of them is written in different shell language (sh ksh & bash). This causing some issues when using backslash charater as... (4 Replies)
Discussion started by: Alalush
4 Replies

8. Shell Programming and Scripting

Bash equivalent of perl's pack function ?

Is there an equivalent of perl's pack function in bash ? Or in other words, how can I achieve the same thing in bash ? Much appreciated. (1 Reply)
Discussion started by: NewDeb
1 Replies

9. UNIX for Advanced & Expert Users

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 (10 Replies)
Discussion started by: Khoomfire
10 Replies

10. Shell Programming and Scripting

Perl equivalent of ksh if / echo statement

Is there an equivalent perl statement for the following ksh statement ? example if then ... else ... fi (2 Replies)
Discussion started by: gefa
2 Replies
Login or Register to Ask a Question