Bilgiler > Örnek Bash Programi



Örnek Bash Programi


#!/bin/bash

#demo of decision making
#first parameter
a=$1
#secont parameter
b=$2
c=$(($a*$b))
let c=a*b
if [ $a -gt $b ]
then
#there are two spaces inside
echo a greater than b
else
echo a less than b
#to ent if
fi

# loop 3rd parameter times
while [ $c -le $3 ]; do
echo Number $c
let c++
done




Kaynak: Çoğunlukla Ekşisözlük ve Wikipedia
 
sonraki bilgi:      Growing up in South Africa, fighting was normal
önceki bilgi:       Uc istanbul- mithat cemal
 
 
Bu sayfaya 356  defa bakıldı