The Korn shell (ksh) is a shell with advanced scripting features, commonly found on commercial unices and some BSD systems but rarely used on Linux.

learn more… | top users | synonyms

3
votes
2answers
559 views

ANDed conditional using regexp and variables

I want to test whether a line, read in from a file, has a specific beginning AND an ending containing a word held in a variable. Here's some code: The input file is: line one #; line two #; line ...
5
votes
2answers
1k views

Adding Ctrl-L as “clear” hotkey in OpenBSD's ksh

I've been looking for a way to use Ctrl-L to clear the monitor instead of typing clear in each time. I found nothing except a patch which didn't work for me. How do I add hotkeys/shortcuts to my ...
2
votes
2answers
405 views

What could cause which to not show something in the path?

There is an executable in my path that I believe is a perl script. >$scriptname $outputofscript but >which $scriptname which: 0652-141 There is no $scriptname in $path and the path it ...
3
votes
2answers
4k views

How to catch optioned and non optioned arguments correctly?

I want to write a shell script which will take some arguments with some options and print that arguments. Suppose the name of that script is abc.ksh. Usage of that script is - ./abc.ksh -[a ...
5
votes
2answers
1k views

Shell script execution on multiple servers

Is it possible to run one part of the ksh/sh script on one server then ssh to another server and continue with the rest of the script? or is there a way around? Anyone had experience with this ? here ...
28
votes
5answers
2k views

When do you use brace expansion?

I understand what brace expansion is, but I don't know how best to use it. When do you use it? Please teach me some convenient and remarkable examples if you have your own tip.
3
votes
3answers
3k views

Using nohup on Solaris 10

I need to transfer a large number of files over SFTP (only between Solaris servers) which takes a very long time. I cannot keep my PC on for this duration. I tried: nohup sftp server1 While the ...
6
votes
1answer
1k views

Reason for ksh obsoleting -eq

The latest version of ksh obsoletes using -eq within [[ ]] blocks, prefering (( )) instead. Why is this? I can't find any documentation on the advantages of (( )) over [[ ]] anywhere, and I find that ...
0
votes
0answers
608 views

bash get file name and extension [duplicate]

Possible Duplicate: bash : get file extension I have file names like below filename.jar filename.tar.gz filename with no extension ...
5
votes
4answers
2k views

How to have separate command history for different sessions for the same user?

I face this issue on some of Unix servers. When I open different session for same user, command history is shared by all the session. This creates issues if by mistake I press Ctrl-P or up arrow and ...