≡ Menu

KSH HowTos & Tutorials

Learning the Korn Shell on Linux, OS X, and Unix like operating systems. Topic includes shell script programming, tips, customization, hacks and much more ( rss feed ).

Linux / Unix: fg Command Examples

fg command

I am new Linux/Unix shell user. How do I bring a background process to the foreground on Linux or Unix-like system? How do I run jobs in the foreground on Linux/Unix bash/ksh or POSIX based shell?
[click to continue…]

less Command Display Line Numbers

I'm a new Linux user. How can I display line numbers using the less command on Linux or Unix-like system using bash/ksh shell?
[click to continue…]

UNIX: Recursive Delete Directory / Files

How do I delete (remove) a directory called $HOME/foo and its content including all files and sub-directories under Unix like operating systems? What is the best way to completely delete /tmp/foo/ with all it's content?
[click to continue…]

I am working on a shell script. I need to find out the current user name. How do I find out the current user name under Bash or Ksh shell running on Linux or Unix like operating systems?
[click to continue…]

Linux / Unix: bg Command Examples

bg command

I am new Linux and Unix system bash/ksh user. How do I run jobs or scripts in the background on Linux/Unix-like systems? How can I run jobs in the background on bash or ksh or sh shell?
[click to continue…]

Linux / Unix Shell Script Get Current Year

How do I get the current year in shell script and store in a shell variable called $myyear?
[click to continue…]

KSH: Import File With Variables and Functions

How do I import variables and functions defined in lib.ksh script to another ksh script called setup.ksh under Linux / Unix like operating systems? How do I execute commands from a file in the current KSH shell?
[click to continue…]