ksh, short for Korn Shell, is a Unix shell developed in the early 1980s.

learn more… | top users | synonyms

2
votes
3answers
3k views

unix command to see the last run command on command line

what is the command to see the previously executed command that was run on the command line ?
0
votes
2answers
762 views

How to repeat commands from history in ksh vi-mode

Say I have a hundred commands in my shell's history, and now I'd like to repeat commands 74 through 78. In the emacs mode of bash/ksh/zsh, I would navigate back to command 74 then hit Control-O on ...
4
votes
1answer
186 views

Create a file whose size in bytes is the percentage of free space on a disk

I needed a command-line method of creating a file whose size in bytes is the percentage of free space on a disk. I intend to run it via cron every five minutes, but first a shell script will do. The ...
0
votes
1answer
72 views

Is There Any Danger in Closing a Parent Xterm Shell with an Active Child?

When I log into my unix servers, I get an xterm window and usually open several more from that initial one. Is there any danger in closing the first window but keeping the children windows open?
2
votes
1answer
191 views

ksh equivalent of perl $! error reason

Is there an equivalent of $! in ksh, which provides the error string ? $? stores the exit code only.