Move under www to ease rsync
This commit is contained in:
22
www/eps/hpr2689/hpr2689_bash14_ex3.sh
Executable file
22
www/eps/hpr2689/hpr2689_bash14_ex3.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Two demonstrations of the use of 'break'
|
||||
#
|
||||
|
||||
echo "Demo 1"
|
||||
for i in {a..c}{1..3}; do
|
||||
echo "$i"
|
||||
[ "$i" == "b2" ] && break
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Demo 2"
|
||||
for i in {a..c}{1..3}; do
|
||||
for j in {1..3}; do
|
||||
echo -n "$i "
|
||||
[ "$i" == "b2" ] && { echo; break 2; }
|
||||
done
|
||||
echo
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user