The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 08-21-2007
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
Hi all,

I think i have some idea of converting your ksh to csh.
See below!

Thanks all for the help!!!

Code:
#!/bin/csh

echo -n "Pls input: "
set number = ($<)

test=`echo "$number" | egrep "^[0-9]+$"`

if [ "$test" ] then
echo "Entered number is a digit"
else
echo "0"
endif