Sponsored Content
Full Discussion: Evaluating a variable
Top Forums Shell Programming and Scripting Evaluating a variable Post 302459254 by methyl on Monday 4th of October 2010 08:16:00 AM
Old 10-04-2010
(See the link in bartus11 post - it shows the special syntax for bash).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

evaluating for a number

I apologize for the simple question but can someone please help me with how to evaluate a number? I will be reading in a file and if a number is >= 100000000, I will do something, if not, I will exit the if statement. Thanks in advance (1 Reply)
Discussion started by: hedrict
1 Replies

2. UNIX for Dummies Questions & Answers

evaluating variables

Hi I have a script in which I have several variables var1 var2 var3 var4 etc...... and field1 field2 field3 field4 etc....... The script similar to this: (6 Replies)
Discussion started by: Bab00shka
6 Replies

3. UNIX for Dummies Questions & Answers

evaluating params

Hi all, I ve a script like.... TBL=employee sql=`cat abhi.sql` \\ abhi.sql contains ------- select a from $TBL echo $TBL echo $sql SQL=`echo $sql` echo $SQL now i want SQL as select a from employee and as select a from $TBL How can I achieve this? Help appriciated (3 Replies)
Discussion started by: abzi
3 Replies

4. Shell Programming and Scripting

* character evaluating too soon - Help!

I have a user defined configuration file, which could contain the following type of entries: directory_001=/a/directory/structure pattern_001=fred* pattern_002=* I have a script which reads the file generically which will loop round loop 1 genvar=”directory” iteration=”001” ... (11 Replies)
Discussion started by: Bab00shka
11 Replies

5. UNIX for Dummies Questions & Answers

evaluating date +%m

how do i evaluate the value of date if ( $(date +%m) > 8 ) then FY_STAMP=FY$(echo $(($(date +%Y) + 1)) | cut -c3-4) else FY_STAMP=FY$(date +%y) fi i want this to make the FY_STAMP increment by 1 if the month is september and up. but cant seem to make it work (3 Replies)
Discussion started by: rsf01
3 Replies

6. Shell Programming and Scripting

Bash: evaluating $? variable (if statement)

Hello, i'm unable to write a correct if... statement to evaluate the $? variable. Could anybody send to me an example? for example, this lines of code didn't work... if ; then etc etc if ; then etc etc Thank you in advanced. (5 Replies)
Discussion started by: aristegui
5 Replies

7. Shell Programming and Scripting

K Shell evaluating value to a variable

Hi, I have the following requirement. V="First" R="V" echo $$R The output should be First. How do i achieve this. how do we evaluate the $R and evaluate it to $V as $R contains V and $V is First. Thanks Vijay (2 Replies)
Discussion started by: vijaykrc
2 Replies

8. Shell Programming and Scripting

$$# is evaluating to 1 when no value

I have the following in my makefile: RESULT=`../${TOOLS_ROOT_PATH}/ext_tools.sh 11`; \ set $$RESULT > tMp; \ rm tMp; \ if ; then \ echo copying external-local tool: $< \($$*\); \ mkdir -p ${EXTERNAL_LOCAL_BIN_DIR}/$<; \ cp -f... (4 Replies)
Discussion started by: jake_ryan
4 Replies

9. Shell Programming and Scripting

evaluating a variable inside a variable

Hi there, i think im getting myself a little confused and need some help :wall: I am reading in a bunch of variables to my script from an external file and need to validate that a value has been set for each so if you can imagine, the user is required to pass in 4 values... (3 Replies)
Discussion started by: rethink
3 Replies

10. UNIX for Dummies Questions & Answers

Parsing file, reading each line to variable, evaluating date/time stamp of each line

So, the beginning of my script will cat & grep a file with the output directed to a new file. The data I have in this file needs to be parsed, read and evaluated. Basically, I need to identify the latest date/time stamp and then calculate whether or not it is within 15 minutes of the current... (1 Reply)
Discussion started by: hynesward
1 Replies
LINK-GRAMMAR(1) 					      General Commands Manual						   LINK-GRAMMAR(1)

NAME
link-parser - parses natural language sentences SYNOPSIS
link-parser [language] [-pp pp_knowledge_file] [-c constituent_knowledge_file] [-a affix_file] [-ppoff] [-coff] [-aoff] [-batch] [-<special "!" command>] DESCRIPTION
In Selator, D. and Temperly, D. "Parsing English with a Link Grammar" (1991), the authors defined a new formal grammatical system called a "link grammar". A sequence of words is in the language of a link grammar if there is a way to draw "links" between words in such a way that the local requirements of each word are satisfied, the links do not cross, and the words form a consistent connected graph. The authors encoded English grammar into such a system, and wrote link-parser to parse English using this grammar. This package can be used for linguistic parsing for information retrieval or extraction from natural language documents. Abiword also uses it as a grammar checker. OPTIONS
-pp pp_knowledge_file -c constituent_knowledge_file -a affix_file -ppoff -coff -aoff -batch -<special ! command> USE
link-parser, when invoked manually, will take control of the terminal; link-parser will then attempt to analyze the grammar of all input, unless escaped with an exclamation mark, according to the dictionary file provided as an argument. If escaped, the input will be treated as a "special command"; "!help" lists all special commands available. link-parser depends on a link-grammar dictionary which contains lists of words and associated metadata about their grammatical properties in order to analyze sentences. A link-grammar dictionary provided by the authors of link-grammar is usually included with the link-grammar package, and can often be found somewhere in the /usr/share/link-grammar/ hierarchy. When this is the case, only the two-letter language code needs to be specified on the command-line. Alternatively, a user can provide their own dictionary as an argument, in which case the dictionary's directory should be specified. Hence, either of the commands link-parser en link-parser /usr/share/link-grammar/en will run link-parser using the english dictionary included with the parser. While in a link-parser session, some example output could be: linkparser> Reading a man page is informative. ++++Time 0.00 seconds (0.01 total) Found 1 linkage (1 had no P.P. violations) Unique linkage, cost vector = (UNUSED=0 DIS=0 AND=0 LEN=12) +------------------------Xp-----------------------+ | +---------Ss*g---------+ | | +-------Os-------+ | | | | +----Ds----+ | | +----Wd---+ | +--AN--+ +---Pa---+ | | | | | | | | | LEFT-WALL reading.g a man.n page.n is.v informative.a . A P.P. violation is a post-processing violation; it is a post-linkage step used to reject invalid parses. The link types shown are specific to English; other langauges will have different link types. link-parser can also be used non-interactively, either through its API, or via the -batch option. When used with the -batch option, link-parser passively receives input from standard input, and when the stream finishes, it then outputs its analysis. So one could con- struct an ad-hoc grammar checker by piping text through link-parser with a batch option, and seeing what sentences fail to parse as valid: cat thesis.txt | link-parser /usr/share/link-grammar/en/4.0.dict -batch SEE ALSO
Information on the shared-library API and the link types used in the parse is avavailable at the Abiword website at http://www.abisource.com/projects/link-grammar/dict/index.html Peer-reviewed papers explaining link-parser can be found at the original CMU site at http://www.link.cs.cmu.edu/link/papers/index.html. AUTHOR
link-parser was written by Daniel Sleator <sleator@cs.cmu.edu>, Davy Temperley <dtemp@theory.esm.rochester.edu>, and John Lafferty <lafferty@cs.cmu.edu> This manual page was written by Ken Bloom <kbloom@gmail.com>, for the Debian project (but may be used by others). April 18, 2008 LINK-GRAMMAR(1)
All times are GMT -4. The time now is 05:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy