The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Check for numeric inputs
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Check for numeric inputs
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
08-20-2007
Raynon
Registered User
Join Date: Sep 2006
Location: Sg
Posts: 350
Check for numeric inputs
Hi All,
How do i modify the below script such that if the input is numeric, it will give the numeric digit, else it will ouput "0"
Code:
echo "xxx" | awk '/^[0-9]+$/'
Raynon
View Public Profile
Find all posts by Raynon
Find Raynon's past nominations received
Find Raynon's present nominations given