bash scripting tutorial code example
Example 1: bash scripting
#!/bin/sh
# Author : Zara Ali
# Copyright (c) Tutorialspoint.com
# Script follows here:
echo "What is your role"
read ROLE
echo "My Role : $ROLE"
Example 2: bash linux scripting laguage
#!/bin/bash
num_a=100
num_b=200
if [ $num_a -lt $num_b ]; then
echo "$num_a is less than $num_b!"
fi
Example 3: linux bash scripts tutorial
$ which bash
Example 4: linux bash scripts tutorial
#!/bin/bashtar -czf myhome_directory.tar.gz /home/linuxconfig