mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-08-03 07:34:30 +00:00
Create if-statement
if statement example
This commit is contained in:
18
if-statement
Normal file
18
if-statement
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Purpose: If statement example
|
||||||
|
#Version:1.0
|
||||||
|
#Created Date: Sat May 12 23:41:50 IST 2018
|
||||||
|
#Modified Date:
|
||||||
|
#Author: Ankam Ravi Kumar
|
||||||
|
# START #
|
||||||
|
echo -e "Please provide Value below ten: \c"
|
||||||
|
read -r value
|
||||||
|
|
||||||
|
if [ $value -le 10 ]
|
||||||
|
then
|
||||||
|
echo "You provided value is $value"
|
||||||
|
touch /tmp/test{1..100}.txt
|
||||||
|
echo "Script completed successfully"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# END #
|
Reference in New Issue
Block a user