#!/bin/bash
function myfun1()
{
echo "-------------------myfun1------------------"
local myname=myfun1
echo $myname
echo "name = $myname"
local num1=1
local num2=2
echo $num1
echo "$num2 + $num1 = num1 + num2"
echo $myname
}
function myfun2()
{
echo "-------------------myfun2------------------"
cd /home/zyhui/
touch /home/zyhui/test.txt
date >>test.txt
df -m
ls -al
}
function myfun3()
{
echo "-------------------myfun3------------------"
mypath = "/home/zyhui/"
myfile = "/home/zyhui/test1.text"
if [ ! -d "mypath"];then
mkdir "$mypath"
fi
if [ ! -f "myfile"];then
touch "$myfile"
fi
}
echo "---------- bash sh test bigen--------------"
myfun1
myfun2
myfun3