PDA

View Full Version : Does Knoppix 3.3 have the Korn Shell



HoofClicker
11-20-2003, 10:35 PM
My wife has started a Tafe Course and she needs a stand alone knoppix cd that has the Korn shell in it. Could someone please tell me which version i need to download for her.

Thanks alot for your help

garyng
11-20-2003, 11:39 PM
My wife has started a Tafe Course and she needs a stand alone knoppix cd that has the Korn shell in it. Could someone please tell me which version i need to download for her.

Thanks alot for your help

I believe bash is a superset of Korn. Beside, if there is any feature in Korn that is not in bash, one better not use it as Korn shell is only available in Unix. just in case you must have a Korn :

apt-get install pdksh

jayhags
11-20-2003, 11:52 PM
I use the korn shell for most of my unix scripting and have found zsh to be a good alternative in GNU/Linux. Debian includes zsh, so just apt-get install zsh.

HoofClicker
11-21-2003, 08:05 AM
Thank you both for the information and help, I have tried the commands apt-get install pdksh and
apt-get install zsh
from within the shell, and get the same error messages for both:

W: not using locking for read only lock file /var/lib/dpkg/lock
E: unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened

Am I entering the commands in the right place or should I be doing it during start-up? If so, how do I go about interupting the start-up process and entering the command?

The reason I need the Korn shell is that I am studying Unix, whilst I have managed to find alternative commands for set (awk) and print (echo) etc, I need to be able to practice these commands so as to pass my final test next week. I wrote my assignment scripts using my Knoppix 3.2 cd, but when I ftp'd them into Sun-Solaris, the amount of errors was not worth mentioning, and I was lucky that I had taken my Knoppix cd to class, so that I could show the teacher that the scripts actually worked.

I would appreciate any advice or information you can provide.

Thank you very much

jayhags
11-21-2003, 12:04 PM
Oops! Sorry about that. apt-get works for me only after a hd-install.

for the live cd, the /var/cache/apt file is a link to the /KNOPPIX file system on the cd which would be read-only.

I was able to download from www.zsh.org the tar gzip sources. Which, after extracting, compiled fine with 'configure' followed by 'make'. The only issue would be installing the binary and it's libs (which could be left in place and added to your environment).

This seems like a lot of trouble, but using zsh allows me to write scripts and just change '#!/bin/zsh' to '#!/bin/ksh' with few to no errors when running the script. (or even link /bin/ksh to /bin/zsh)

I am supprised to hear that there were so many errors in your script. Which shell are you using then? bash?

baldyeti
11-22-2003, 01:41 AM
I am supprised to hear that there were so many errors in your script.
Which shell are you using then? bash?
Don't be surprised. In as much as GNU's not Unix, bash is not ksh.
I wish the korn shell was the standard linux shell like in most other unices,
but that'll never happen. There's nothing wrong with bash of course, it's
just that the not always so small incompatibilities cause unnecessary hassle.

To the original poster, here are 3 suggestions:
*) use morphix and burn the pdksh debian pakage (http://ftp.debian.org/debian/pool/main/p/pdksh/)under /deb on the CD
it''ll be available at run-time
*) on windows, I recently noticed cygwin (http://sources.redhat.com/cygwin/) now has a port of pdksh.
this is not part of the default bundle, so you'll need to explicitly select it.
*) with knoppix, you might try to fiddle with the /KNOPPIX/knoppix.sh
script and use it to somehow put a binary pdksh on your path when booting

And good luck with the test!