Posts Tagged Shell

Good bash shell scripts book for newbie

Good bash shell scripts book for beginner
http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/lsst/

, ,

No Comments

Check the variable an integer

Check the variable is a integer or others.

#!/bin/bash

read Nau
if [ “${Nau//[^0-9]/}” == “$Nau” ]; then
echo “$Nau Is a number”;
else
echo “$Nau is not a number”
fi

,

No Comments