For root I use csh and for users bash.
tomh009 said:The big thing that I love about ksh in general is "set -o vi" which lets me use the navigation keys that are ingrained in body ...
bsddaemon said:I wish I could do in-line scripting (scripting with command line in interactive mode) with zsh. There are some differences syntaxes, builtin commands in Bourne and zsh.
vermaden said:Any examples?
tomh009 said:The big thing that I love about ksh in general is "set -o vi" which lets me use the navigation keys that are ingrained in body ... navigation without having to think about it, and without having to locate the cursor keys on the keyboard. And note that it also supports "set -o emacs" so there is no need to have a religious discussion about vi vs emacs! :e
Citsakots said:Wow, thank you for such a great post. I didn't know you could do that and also thank you for not feeding me "baby food".
AFTERINSTALL in pkgtools.conf:'shells/bash' => [
'WITH_INCLUDED_FAQ=yes',
'WITH_STATIC_BASH=yes',
'WITH_INTEGRATED_HELPFILES=yes',
],
'shells/bash' => sprintf(
'/root/bin/ports/bash.sh'
),
#!/bin/sh
cp /usr/local/bin/bash /bin/bash
cp /etc/shells /tmp
grep -iv "bash" /tmp/shells > /etc/shells
echo "/bin/bash" >> /etc/shells
lazybones said:I'm married to the vi commandline editing - in any other shell I'm driving people nuts with beeps when I fire off "[esc]kkk"
bindkey -v
vermaden said:Any examples?
func () {
VARS="a 1 b 2 c 3"
for var1 var2 in $VARS; do
echo $var1 $var2
done
}
Syntax error: word unexpected
bsddaemon said:I wish I could do in-line scripting (scripting with command line in interactive mode) with zsh. There are some differences syntaxes, builtin commands in Bourne and zsh.
Is there any setting that I can enable the "bourne shell compability", if it does exist?
(...)
Another one:
Code:func () { VARS="a 1 b 2 c 3" for var1 var2 in $VARS; do echo $var1 $var2 done }
This function works fine with zsh, but doesnt work with Bourne
In my script, I have no choice but to define shebang as #!/usr/bin/env zsh :S
Maybe someone has better solution?
The syntax of the for command is:
for variable [in word ...]
do list
done
tomh009 said:Hmm, not many ksh users out there, it seems. After spending my early years with csh and tcsh, I switched about 20 years ago to ksh, as I could have the same shell on Windows (with MKS Toolkit), and I haven't switched since.
I use pdksh, as none of the ksh93 features seem compelling to me, and I figure that for sure I'd have to relearn something.
The big thing that I love about ksh in general is "set -o vi" which lets me use the navigation keys that are ingrained in body ... navigation without having to think about it, and without having to locate the cursor keys on the keyboard. And note that it also supports "set -o emacs" so there is no need to have a religious discussion about vi vs emacs! :e