Sponsored Content
Full Discussion: if else endif using csh
Top Forums Shell Programming and Scripting if else endif using csh Post 302381919 by kristinu on Monday 21st of December 2009 11:34:23 AM
Old 12-21-2009
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.

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Surrounding a chunk of code by #ifdef and #endif

Hello the great gurus :) I'm quite new to this, so perhaps I'm asking a simple and trivial question (which is good, because you'll answer for sure :)))) Anyway. I have an amount of *.c files (about 100), and what I want to do, is to surround a specific function call with #ifdef and #endif. ... (6 Replies)
Discussion started by: xxxaxa
6 Replies

2. UNIX for Dummies Questions & Answers

csh syntax

I am trying to list output in columns in csh. What would be the syntax for this shell if in ksh it is: ls -d !(*SNMP*) ? (0 Replies)
Discussion started by: charlie11k
0 Replies

3. Shell Programming and Scripting

csh failing to call an 2 embedded csh script

I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them) Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies

4. UNIX for Dummies Questions & Answers

csh

what is a .csh extension? there is a command line: mkaphed_ctio.csh Does anyone know what this is? :confused::confused::confused: (1 Reply)
Discussion started by: cosmologist
1 Replies

5. UNIX for Advanced & Expert Users

then: then/endif not found

Hi All I am getting this error when i try to run script from root using other user profile. Command I am running is "su - user -c command" Error envounterd "then: then/endif not found" Can any body please help me on this ... (4 Replies)
Discussion started by: asadlone
4 Replies

6. Shell Programming and Scripting

if in csh

I am using this code echo "opt_tpath = $opt_tpath" if ($opt_tpath == 1) echo " -tpath = $Atpath\n" and is giving opt_tpath = 0 Atpath: Undefined variable. Atpath should only be printed in opt_tpath == 1 but it still tries to print. ---------- Post updated at 10:05 AM ----------... (1 Reply)
Discussion started by: kristinu
1 Replies

7. Shell Programming and Scripting

Using \n in csh

I am trying to use \n for a new line in csh like this echo "some text\n" echo "some more text\n" but am getting some text\n some more text\n (10 Replies)
Discussion started by: kristinu
10 Replies

8. Shell Programming and Scripting

csh script help

Hey I am brand new to this forum and scripting. I have several documents (1000+) all formated exactly the same. Each document contains 97 lines. I want to pull 3 lines from the documents to populate a file. These 3 lines are line number 9, 24, and 58. Ok my questions: Instead of using... (3 Replies)
Discussion started by: david6789
3 Replies

9. Shell Programming and Scripting

.sh to .csh

Hi All, Could any one of you give me a hand to convert the following line of codes from .sh to .csh please ? proc_id=`fuser /tmp/test` if then echo "File is not being used by any thing" fi if then echo "File is being used... please wait" sleep 1 fi Regards. (1 Reply)
Discussion started by: sraj142
1 Replies

10. Shell Programming and Scripting

What does this do in CSH?

CSH experts What does the following do in CSH? :(){:|:&};: I was asked the question, but I don't know. I'm not aware of the context. Any ideas? Thanks! (1 Reply)
Discussion started by: wallg
1 Replies
Locale::Codes::LangFam(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangFam(3pm)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangFam(3pm)
All times are GMT -4. The time now is 08:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy