#!/bin/bash
# Scriptname: num
num=0 # Initialize num
while (( $num < 10 )) # or while [ num -lt 10 ]
do
echo -n "$num "
let num+=1 # Increment num,the same as (( num=num+1 )) or (( num=$num+1 ))
done
echo -e "\nAfter loop exits, continue running here"
阅读(241) | 评论(0) | 转发(0) |