Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [ksh]

The KornShell is an open source, POSIX-compatible shell language from AT&T based upon the original Bourne shell.

Filter by
Sorted by
Tagged with
2 votes
2 answers

Archive, compress, remove old archive file then remove source file if below set size

I'm working on a script that will archive, compress, clear old archive files, then remove the source file if it is below a set size. The output when I tested it worked, but I just wanted a second ...
Brad Barnes's user avatar
0 votes
1 answer

Print a "shebang" line, or prepend it to a file

This is a sort-of-useless "utility" I wrote to learn my way around shell programming better. My concerns are: Is the code readable? Could it be more efficient, or just simpler? The logic ends up ...
shadowtalker's user avatar
3 votes
1 answer

Shell binary search with sorted input

I have coded binary search in shell, just for practice. Input Input data is already sorted set of numbers streamed to the script. $1 is the sought number. ...
theoden8's user avatar
  • 329
16 votes
5 answers

Unix shell function for adding directories to PATH

Adding a directory to the PATH in Unix/Linux is a very common task. However, what if the directory is already in the path? My goal is to write a shell function (...
Sildoreth's user avatar
  • 273
2 votes
1 answer

ksh script to perform an upgrade

Could you please review my script? ...
java_mouse's user avatar
3 votes
1 answer

Parsing Oracle errors with a ksh function

Some time ago I wrote a small routine to run some quick n' dirty queries (and with that I mean it is not used for large queries) against an Oracle DB, but also wanted to do it a bit easier to parse ...
filippo's user avatar
  • 143