May 2, 2017

[HDGEM] Bash loop and range example

#!/bin/bash  echo "Bash version ${BASH_VERSION}..."  for i in {0..10..2}    do        echo "Welcome $i times"   done
Sample outputs:
Bash version 4.0.33(0)-release...  Welcome 0 times  Welcome 2 times  Welcome 4 times  Welcome 6 times  Welcome 8 times  Welcome 10 times


--
Posted By Blogger to HDGEM at 5/02/2017 11:43:00 AM
Post a Comment

Featured Post

Setup Chinese Input Method in Ubuntu 17.10 Artful

sudo apt install ibus-sunpinyin After either of those commands do not forget to restart the IBus daemon ibus restart You might need t...