Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

if else endif using csh

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-21-2009
kristinu kristinu is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 5 November 2016, 8:06 PM EDT
Posts: 892
Thanks: 67
Thanked 8 Times in 8 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 Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 12:56 PM
Surrounding a chunk of code by #ifdef and #endif xxxaxa Shell Programming and Scripting 6 05-09-2007 02:23 PM



All times are GMT -4. The time now is 08:04 PM.