## Manipulating Binary Data Using The Korn Shell

In this post, I demonstrate via a number of working example scripts how to manipulate binary files and data using Korn Shell 93. I also compare and contrast how binary data is stored internally by the Korn Shell and the Z Shell.

## The KSH93 Version String

In this short post, I explain the various parts of the ksh93 version string and show you some useful things you can do with the version string.

## Dynamically Updating Xterm Title using Ksh93

In this post, I show you how to use a discipline function dynamically customize the title of your xterm window and your shell prompt

## Korn Shell DEBUG Trap

The trap shell builtin is used to change the way signals are handled by the Korn Shell 93 (ksh93) shell. In addition, a trap may be set for three ksh93 pseudo-signals: EXIT, ERR, and DEBUG. In this post we demonstrate how to use the DEBUG pseudo-signal to trap changes in the value of a variable for debugging purposes. trap [ -p ] [ action ] [ sig ] . . . The -p option causes the trap action associated with each trap as specified by the arguments to be printed with appropriate quoting. Otherwise, action will be processed as if

## Convert Integer to Float in Korn Shell

There is no explicit mechanism, such as float(integer), in the Korn Shell (ksh93) to convert an integer to a float which in the Korn Shell is by default a long double. By default, dividing integer 1 by 3 produces 0: \$ integer x=1 \$ echo \$(( x/3 )) 0 \$ So how to you get the result, 0.3333 …, which you probably were expecting? You can convert x to floating point and then do the division by replacing the 3 with either 3. or, as I normally do, with 3.0: \$ integer x=1 \$ echo \$(( x/3. )) 0.333333333333333333 \$