Search Results

Search: Posts Made By: unxwzrd
48,361
Posted By unxwzrd
test to see if variable is numeric
You can test the contents of a variable directly using ksh
pattern matching operators:


x=2763
if [[ $x == +([0-9]) ]]; then
print okay
else
print naga
fi


This test...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy