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

I am a new Unix shell programer. How can I extract the directory name from a full path (say /nas01/data/backups/file.tar.gz)? How do I get directory name from its path on a Linux or Unix-like system?

{ 1 comment }

I am a new Linux and Unix-command line user. I am using find command to search file called “fooBar.conf.sample” in my home directory. I do not know the case, it could be uppercase, lowercase, or a mix of both. How can search a file and ignore case on a Linux or Unix-like system?

{ 1 comment }

I am porting ksh script from Sun/Oracle Unix to Linux. How do I install ksh (KornShell) in CentOS / Fedora / Red Hat Enterprise Linux? How do I run and test ksh script on RHEL/CentOS Linux?


I‘m a new Linux system user. How can I redirect command error output /dev/null on a Linux or Unix-like system using Bash shell?


I am a new Linux user. I have text files with lots of empty lines. How do I delete all empty lines under Linux or Unix operating systems?


I am working on a shell script. I need to find out the current working directory. How do I get the current working directory under Bash or Ksh shell running on Linux or Unix like operating systems?

{ 1 comment }

I am a new Linux command line user. How do I start or run command in the background so that I can access command prompt immediately?