Search Results

Search: Posts Made By: haz
28,171
Posted By haz
Thanks, that did it perfectly. I changed it so it...
Thanks, that did it perfectly. I changed it so it would check the other way round using -ne instead of -eq.
28,171
Posted By haz
Sorry, should have specified it is a Bourne shell...
Sorry, should have specified it is a Bourne shell script that I am writing.

This is what I've tried writing, where am i going wrong?


namenum=$1

if [ "$namenum" -eq *[a-zA-Z]* ] ; then
...
28,171
Posted By haz
Checking if string contains integer
G'day guys, first post so be gentle.

I need help with some code to work out if a variable (string) contains any integers. The valid variable (string) must contain only letters.

Also need to be...
Showing results 1 to 3 of 3

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