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::LangExt(3)				User Contributed Perl Documentation				 Locale::Codes::LangExt(3)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. 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 = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_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.iana.org/assignments/language-subtag-registry The IANA language subtag registry. 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.16.3 2013-02-27 Locale::Codes::LangExt(3)
All times are GMT -4. The time now is 02:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy