Translate

Archives

Bash Printf %T Option

This post discusses and demonstrates how to use the printf %T date functionality available in the Bash shell since version 4.2.

Printing Bash or Korn Shell Script Arguments

This post discusses various issues, workarounds and solutions to printing details of arguments (AKA positional parameters) passed to shell scripts via the command line upon invocation of the shell script.

Bash-like Customizable Prompt in Korn Shell

Bash has built-in support for extensive PS1 prompt customization and as a result many people customize their shell prompts. There is no equivalent built-in support for PS1 customization in ksh93 but such support can easily be added using discipline functions.

Korn Shell Launcher for Windows Subsystem for Linux

In this post, I show you how to create a Korn Shell launcher for the new Windows Subsystem for Linux.

Zero Padding Brace Expansions in the Korn Shell

Both bash and zsh shells support leading zeros in ranges: $ echo {1..10} 1 2 3 4 5 6 7 8 9 10 $ echo {01..10} 01 02 03 04 05 06 07 08 09 10 $ echo {001..010} 001 002 003 004 005 006 007 008 009 010 $ From the bash manpage section on brace expansion: Supplied integers may be prefixed with 0 to force each term to have the same width. When either x or y begins with a zero, the shell attempts to force all generated terms to contain the same number of digits, zero-padding where