langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -0,0 +1 @@
|
|||
if test 3 -lt 5; then echo '3 is less than 5'; fi
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
if test 4 -ge 6; then
|
||||
echo '4 is greater than or equal to 6'
|
||||
elif test 4 -lt 6; then
|
||||
echo '4 is less than 6'
|
||||
else
|
||||
echo '4 compares not to 6'
|
||||
fi
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
case value in
|
||||
choicea)
|
||||
foo
|
||||
;;
|
||||
choiceb)
|
||||
bar
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
test 3 -lt 5 && echo '3 is less than 5'
|
||||
test 4 -ge 6 || echo '4 is not greater than or equal to 6'
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# This is a while loop
|
||||
l=1
|
||||
while [ l -le 5 ]; do
|
||||
echo $l
|
||||
done
|
||||
|
||||
# This is an until loop
|
||||
l=1
|
||||
until [ l -eq 5 ]; do
|
||||
echo $l
|
||||
done
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
if (3 < 5) echo '3 is less than 5'
|
||||
if ({ grep -q ^root: /etc/passwd }) echo 'passwd has root'
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
if (4 >= 6) then
|
||||
echo '4 is greater than or equal to 6'
|
||||
else if (4 < 6) then
|
||||
echo '4 is less than 6'
|
||||
else
|
||||
echo '4 compares not to 6'
|
||||
endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue