Click to See Complete Forum and Search --> : help with korn shell
lordthoth
09-24-2000, 02:37 PM
you know, it sucks when you forget your password and have to type your message in again....anyway..I am learning korn shell and have some issues that I can't solve.
1.) typing 'echo $SHELL' returns a blank line, but works for all of the other shells.
2.) in my .profile I have just 'exec ksh' which doesn't work, yet 'exec tcsh' will.
3.) It seems that my keyboard mappings arn't correct. Esc esc doesn't work for command/file completion, nor does the backspace key work for backspacing.
iDxMan
09-24-2000, 07:05 PM
Originally posted by lordthoth:
you know, it sucks when you forget your password and have to type your message in again....anyway..I am learning korn shell and have some issues that I can't solve.
1.) typing 'echo $SHELL' returns a blank line, but works for all of the other shells.
2.) in my .profile I have just 'exec ksh' which doesn't work, yet 'exec tcsh' will.
3.) It seems that my keyboard mappings arn't correct. Esc esc doesn't work for command/file completion, nor does the backspace key work for backspacing.
For completion try:
set -o vi-tabcomplete -o vi-esccomplete
you can use tab and ESC completion.
What does your backspacing key do? Produce a "^H" or "^?" instead of backspace?
Try:
stty erase "^H" kill "^U" intr "^C" eof "^D"
-r
Daruma
09-24-2000, 09:03 PM
Originally posted by lordthoth:
I am learning korn shell and have some issues that I can't solve.
2.) in my .profile I have just 'exec ksh' which doesn't work, yet 'exec tcsh' will.
Edited by Daruma
Greetings! Try typing:
$ ls -l /bin/*sh
You should see a list of available shells. In Linux, the Bourne again shell (BASH), is actually a combination of the original Bourne Shell and features from the Korn shell. This is typically the default shell when Linux is installed. There have been very few shell scripts/commands that I have been unable to run in both an HP-UX (Korn) and Linux (BASH) session identically...
Hope this helps!!
lordthoth
09-25-2000, 10:29 AM
Well I got the echo $SHELL, I didn't have 'shell' in all caps. I also did something where it always boots to korn shell.(chsh ....) I haven't tried to completion yet. Also, if I wanted to change my prompt(eg.
(loginname@host:/home/loginname.......) would I put that in a .profile? I am confused I thought that .login was just for csh(tcsh)? So what is .profile exactly used for then?
lordthoth
lordthoth
10-06-2000, 10:56 AM
Originally posted by iDxMan:
For completion try:
set -o vi-tabcomplete -o vi-esccomplete
you can use tab and ESC completion.
What does your backspacing key do? Produce a "^H" or "^?" instead of backspace?
Try:
stty erase "^H" kill "^U" intr "^C" eof "^D"
-r
Ok well, nor the tab-complete or esc-complete worked. However the stty... worked, but now only the backspace key worked. I guess in tcsh it is programmed in to make both the delete key and backspace work. Also cursor keys don't work. I am confused. I have the orilley korn shell book but it isn't helping me to much. I still can't get my .profile to execute when I log in.
iDxMan
10-06-2000, 11:50 PM
What version of ksh are you using? I'm using @(#)PD KSH v5.2.14 99/07/13.2 ..
To change your prompt:
you could put it in your user .profile or change the system profile (/etc/profile)
eg:
PS1="<"'$LOGNAME'"@$(uname -n)> "'$PWD # '
What are the permissions on your .profile ? try setting to 0744
-r
per©oDåN
10-06-2000, 11:55 PM
Please explain the origins of the KoRn shell & how it differs if anyone who has used/is using it has a few minutes...
?
iDxMan
10-08-2000, 02:29 AM
The KornShell language was designed and developed by David G. Korn at AT&T Bell Laboratories.
There are
two other widely used shells, the Bourne shell developed by Steven Bourne at AT&T Bell Laboratories,
and the C shell developed by Bill Joy at the University of California. ksh has the best features of both, plus
many new features of its own. Thus ksh can do much to enhance your productivity and the quality of your
work, both in interacting with the system, and in programming. ksh programs are easier to write, and are
more concise and readable than programs written in a lower level language such as C.
Link 2: http://www.kornshell.com/doc/ksh93.html
-- I'll leave it at regarding the cut n' paste from the web. I personally use it for the in-line editing. I don't like to take my hands off the home row to go hit a stupid arrow key when I need to go back `n` commands. Its also really handy to use a regex to find a command that is 50 back in the history. Plus ksh is the shell I use at work, so I try to keep it the same at home..
Perhaps its habit, but I really don't like using anything else.. bash/csh/blah are "ok", but my productivity drops..
-r
[This message has been edited by iDxMan (edited 08 October 2000).]
lordthoth
10-12-2000, 11:55 AM
Well seems that my problems were not exactly with my .profile not working. It is a problem with how KDE handles the init files. It doesn't execute them the same as text mode does.