jamesdcarroll
July 22nd, 2008, 04:48 AM
I'm banging my head on my desk. I'm a VB/Java/Oracle programmer being thrust into the Unix world and I need to learn Korn shell programming (I'm working through the Rosenberg book).
I have a few questions I'm hoping you can help me out with.
1. vi is just pure evil, isn't it? ARRRGH!! :mad:
2. I installed ksh from synaptic and when I look in /bin I see 'ksh' which is a link (?) to '/etc/alternatives/usr.bin.ksh' which in turn is a link to '/bin/ksh93' which is the actual executable sitting right next to the original link. Is that right?
3. When I open terminal I'm in bash, right?
4. When I type 'ksh' the prompt changes and I 'think' that I am in the korn shell. In fact, when I enter a command that it doesn't like it complains: 'ksh: blah: not found [No such file or directory]' instead of 'bash: blah: command not found'. Am I really in the Korn shell?
5. When I type 'ksh93' and do the same thing I get 'ksh93: blah: not found [No such file or directory]'. If all the 'ksh' items are just links that all end up at '/bin/ksh93' why would there be a difference? Shouldn't 'ksh' respond with 'ksh93:'?
6. The very first command the book has you try is 'echo $RANDOM' claiming that if you are in the Bourne shell you'll get nothing. I get an integer return. This, plus [5] is confusing me as to what shell I'm really in; that there's something going on that isn't what I think/ the book is telling me.
7. The book says that PS1 contains the command prompt and I'd like to change it to '$PWD> ' as the default when it first starts. Is there a file where I can do that?
I have a feeling that once I get my feet under me from an environment perspective (kind of like when I learned what the classpath in JAVA was all about), I'll be able to move fairly quickly, but right now I'm not moving at all
Thanks!
I have a few questions I'm hoping you can help me out with.
1. vi is just pure evil, isn't it? ARRRGH!! :mad:
2. I installed ksh from synaptic and when I look in /bin I see 'ksh' which is a link (?) to '/etc/alternatives/usr.bin.ksh' which in turn is a link to '/bin/ksh93' which is the actual executable sitting right next to the original link. Is that right?
3. When I open terminal I'm in bash, right?
4. When I type 'ksh' the prompt changes and I 'think' that I am in the korn shell. In fact, when I enter a command that it doesn't like it complains: 'ksh: blah: not found [No such file or directory]' instead of 'bash: blah: command not found'. Am I really in the Korn shell?
5. When I type 'ksh93' and do the same thing I get 'ksh93: blah: not found [No such file or directory]'. If all the 'ksh' items are just links that all end up at '/bin/ksh93' why would there be a difference? Shouldn't 'ksh' respond with 'ksh93:'?
6. The very first command the book has you try is 'echo $RANDOM' claiming that if you are in the Bourne shell you'll get nothing. I get an integer return. This, plus [5] is confusing me as to what shell I'm really in; that there's something going on that isn't what I think/ the book is telling me.
7. The book says that PS1 contains the command prompt and I'd like to change it to '$PWD> ' as the default when it first starts. Is there a file where I can do that?
I have a feeling that once I get my feet under me from an environment perspective (kind of like when I learned what the classpath in JAVA was all about), I'll be able to move fairly quickly, but right now I'm not moving at all
Thanks!