- for in do done
users=$(cut -d ':' -f1 /etc/passwd)
for username in $users
do
echo $username
done
- for do done
read -p "echo number " nu
for((i=0; i<$nu; i++))
do
echo $i
done
users=$(cut -d ':' -f1 /etc/passwd)
for username in $users
do
echo $username
done
read -p "echo number " nu
for((i=0; i<$nu; i++))
do
echo $i
done