≡ Menu

syntax

How do I check whether a directory is empty or not under Linux / UNIX using a TCSH / C shell script?
[click to continue…]

How do I count and print particular character (say D or digit 7) in a string or variable under Bash UNIX / Linux shell?
[click to continue…]

How do I open a text file using VIM or VI and go to specific line? How do I open a file using vim and go to specific function() in my source code?
[click to continue…]

Use export Command in Linux / Unix

How do I use export command under Linux or Unix like operating systems to set variables?
[click to continue…]

I have a file of that looks as follows:

foo bar
tom jerry
UNIX Linux

Each word and/or Linux is a different length. How do strip or remove the last character from each line using bash or ksh shell only on a Linux or Unix-like systems?

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsNone
Estimated completion time2m

[click to continue…]

How do I pause for 5 seconds or 2 minutes in my bash shell script on a Linux or Unix-like systems?
[click to continue…]

Bash Infinite Loop Examples

How do I write an infinite loop in Bash script under Linux or UNIX like operating systems?
[click to continue…]