Browsing this Thread:   2 Anonymous Users






bash
#1
Just can't stay away
Just can't stay away


See User information

#!/bin/bash

echo "haha"

my_name="value"
echo "hello i am ${my_name}"


if [ 3 -eq 2 ]
then
echo "3 -eq 2"
elif [ 3 -gt 2 ]
then
echo " 3 -gt 2"
else
echo "haha 3 2"
fi

read -p "prompt message : " var

case "$var" in
"one")
echo "one one"
;;
"tow")
echo "tow tow"
;;
esac

colors="red green blue"

for col in $colors
do
echo $col
done

for (( v1=1; v1<3; v1++))
do
echo $v1
done

files=$(ls *)

for file in $files
do
echo $file
done


for ok in $@
do
echo $ok
done

LINE=1
while read CURRENT_LINE
do
echo "${LINE}: $CURRENT_LINE"
((LINE++))
done < /etc/passwd


function fone()
{
echo "$1 $2 "
}

function ftow()
{
echo "$1 $2"
}

fone 11 22
ftow "ftow" 22


Posted on: 2019/9/3 16:05
Top








friend links
Themes

(2 themes)
Login
Username:

Password:


Lost Password?
Register now!
Categories
Xoops (11)
--Modules (2)
--Themes (0)
Article (8)