UNIX - SHELL LOOP CONTROL - Tutorials for EasyMock, Object Oriented Analysis & Design, Tik

UNIX - SHELL LOOP CONTROL - Tutorials for EasyMock, Object Oriented Analysis & Design, Tik

瀏覽:555
日期:2024-08-23
#!/bin/sh NUMS="1 2 3 4 5 6 7" for NUM in $NUMS do Q=`expr $NUM % 2` if [ $Q -eq 0 ] then echo "Number is an even number!!" continue fi echo "Found odd number" done This will produce following result: Found odd number Number is an even number!! Found ......看更多