bash -> ksh HOWTO?
am 10.10.2007 15:37:08 von Matej CeplHi,
is there something like %subj%? I would be interested in trying
ksh, but I get lost really fast. Is there some document how to
live in ksh when one knows only bash?
MatÄj
Hi,
is there something like %subj%? I would be interested in trying
ksh, but I get lost really fast. Is there some document how to
live in ksh when one knows only bash?
MatÄj
On Wed, 10 Oct 2007 15:37:08 +0200, Matej Cepl wrote:
> Hi,
>
> is there something like %subj%? I would be interested in trying ksh, but
> I get lost really fast. Is there some document how to live in ksh when
> one knows only bash?
>
> MatÄj
Would you care to be more specific? Are you using it for programming or
interactive? What sorts of things can you do in bash that you can not do
in ksh?
It might be that all you need to know is to type "set -o emacs".
Which version of ksh are you using?
On 2007-10-10, Matej Cepl wrote:
>
> is there something like %subj%? I would be interested in trying
> ksh, but I get lost really fast. Is there some document how to
> live in ksh when one knows only bash?
If you write your bash scripts using portable (i.e., POSIX) syntax,
the scripts will run just as well in ksh.
Many of the extensions in bash are also in ksh93, so those will not
need changing.
--
Chris F.A. Johnson, author
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
On 2007-10-10, 15:13 GMT, Icarus Sparry wrote:
> It might be that all you need to know is to type "set -o
> emacs".
Yes, that's probably what is absolutely necessary and which makes
me able to survive. Other, more precise question will certainly
follow. Just for the record, it is ksh-20070628-1.1.fc8 on Fedora
8 (aka Fedora Rawhide).
MatÄj
On 2007-10-10, 15:13 GMT, Icarus Sparry wrote:
> It might be that all you need to know is to type "set -o
> emacs".
And of course, thanks for replying.
MatÄj
> Hi,
> is there something like %subj%? I would be interested in trying
> ksh, but I get lost really fast. Is there some document how to
> live in ksh when one knows only bash?
case $- in
*i*)
set -o vi-tabcomplete
set -o emacs
set -o ignoreeof
set -o braceexpand
bind '^I=complete-list'
bind '^[OH'=beginning-of-line
bind '^[OF'=end-of-line
bind '^[[3'=prefix-2
bind '^[[3~'=delete-char-forward
;;
esac
--
Best regards, Aleksey Cheusov.