Answers for "check value is number in cmd"

0

check value is number in cmd

echo off &echo.&echo off
set /p pilih=silahkan masukan adb port ? &
echo off &echo.&echo off

SET /a param="%pilih%" + 0

if not %param% == 0 echo hello wordl
pause
Posted by: Guest on October-16-2020
0

check value is number in cmd

#!/bin/bash

var=a

if [ -n "$var" ] && [ "$var" -eq "$var" ] 2>/dev/null; then
  echo number
else
  echo not a number
fi
Posted by: Guest on October-16-2020

Code answers related to "check value is number in cmd"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language