Quantcast
Channel: Linux by Examples » echo
Browsing latest articles
Browse All 6 View Live

Setting Environment Variable

You may wonder how you knowing the hostname or machine type you are log in. Actually we have a lot way to do so, one of them is print out the environment variable set. How we can set this variable?...

View Article



check for error number

Error or no success running a command always return a number, usually it will return 0 unless it occurs an error. To check what error number it returns, do this after command is done. echo $? To test...

View Article

word count

Word count is a very common tools that used to calculate number of lines, words and characters. For example if I can do this echo "hello world." | wc 1 2 13 The result indicate that there are 1 line, 2...

View Article

if … then … fi

if iis a basic programming checking for condition and reacts based on the condition, bash uses if to check for File integer String For checking the File, let say your file name is stored at $fn, and...

View Article

Generating Random numbers

We can obtain pure random (NOT pseudo-random) bytes from /dev/random. Linux kernel harnesses a good source of randomness from you. The random bytes in /dev/random is measuring based on the time delay...

View Article


Discover user guides and manuals within your linux system

Do you realized that we can obtain a lots of user manuals and guideline documents from our system? There is a folder /usr/share/doc, you may find some useful docs already preinstalled by your distro....

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images