Search Results

Search: Posts Made By: travish12
12,892
Posted By travish12
Thanks, I adapted the if statement if...
Thanks,


I adapted the if statement
if ( $n % 2 == 0 ) then
echo " $n is even"
else
echo " $n is odd"
endif
from your program and it worked like a charm
12,892
Posted By travish12
TCSH Check if number is even
Hey,
I am trying to check if an integer is even in a tcsh script

This is what I am running now

set lattest = ` echo $latmin "%2" | bc -l `
echo $lattest

if ( $lattest == 0 ) then
...
Showing results 1 to 2 of 2

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