if else endif using csh | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

if else endif using csh

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-21-2009
kristinu kristinu is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 22 April 2014, 7:20 PM EDT
Location: London
Posts: 835
Thanks: 59
Thanked 7 Times in 7 Posts
if else endif using csh

I am trying to use csh to do an if statement as below


Code:
  if ( $tmaxf2 > $tmaxf1 ) then
    set tmax = $tmaxf2
  else
    set tmax = $tmaxf1
  endif

Does not work and I'm getting


Code:
if: Badly formed number.

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
then: then/endif not found asadlone UNIX for Advanced & Expert Users 4 06-05-2009 11:56 AM
Surrounding a chunk of code by #ifdef and #endif xxxaxa Shell Programming and Scripting 6 05-09-2007 01:23 PM



All times are GMT -4. The time now is 03:12 PM.