Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ksh]

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

1
vote
0answers
27 views

Create an XML using the CSV input [closed]

Aim : To create a xml file from the csv file I am trying to create a xml file from the csv file , the xml contains header , footer and body . I have create 3 different functions. Input csv file <...
-1
votes
1answer
50 views

Legacy code: break in if block without a loop [closed]

I am a beginner in shell scripting and I am working on a legacy project where I need to maintain/enhance the shell scripts. I came across the following code block in a shell script. ...
0
votes
1answer
143 views

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 ...
3
votes
1answer
75 views

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. ...
10
votes
4answers
6k views

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 (...
2
votes
1answer
67 views

ksh script to perform an upgrade

Could you please review my script? ...
3
votes
1answer
325 views

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 ...