Sponsored Content
Top Forums Shell Programming and Scripting KSH script eval(?) to set variable Post 302299580 by radoulov on Friday 20th of March 2009 11:56:36 AM
Old 03-20-2009
Strange ...
Actually, if I understand correctly it should be:

Code:
$ ZONENUM=zndvux02 zonezndvux02=OK
$ eval "ZONENAME=\$zone$ZONENUM" 
$ print $ZONENAME
OK

But I agree that in your case those quotes are not needed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting value of variable set in subprocess script

I am writing a shell script that executes another script by fetching it over the network and piping its contents into sh (ftp -o - $script | sh; or wget -O - |sh). Since this bypasses putting the script on the filesystem, this means I can't source the script directly (using . ), but rather it... (1 Reply)
Discussion started by: hadarot
1 Replies

2. Shell Programming and Scripting

using eval with set, wc, and expr

Okay this is a mess, I'm trying to assign variables with variables in a for-loop. Here is what i have for code. The syntax is not good. Given the following script: #! /bin/csh foreach site (ABC DEF GHI) eval set \t$${site}sf = ``wc -l \$${site}.sf | awk '{print $1}'`` eval set... (2 Replies)
Discussion started by: wxornot
2 Replies

3. Shell Programming and Scripting

eval a variable that has a .

Hi, Is there any way that I can eval the following - eval abc.csv=def.csv I am getting the - bash: command not found error. thanks. (3 Replies)
Discussion started by: ttshell
3 Replies

4. Shell Programming and Scripting

Ksh script - Design ? - Search file and set variables

Hi - I'm trying to think of a clever way to write a shell script (trying to stay w/ ksh as that's what I know the best...) that will resolve the following problem: Problem - On a daily basis I have to email folks who are on-call to remind them. I was hoping to script this out so I could have... (9 Replies)
Discussion started by: littlefrog
9 Replies

5. Shell Programming and Scripting

Eval Tricky Manipulation of Arry in KSH - Help

Hi, Could any one share the intelligence to track this problem. I have any array BT_META_36 and it prints properly with contents of array. # print "BT_META_36=${BT_META_36}" # BT_META_36=cab3,cab4:HDS:052,07A cab3,cab4:HDS:052,07A Now I have a BT_META_36 assigned to a variable.... (0 Replies)
Discussion started by: ajilesh
0 Replies

6. Shell Programming and Scripting

set ksh script in restricted mode

Hi, I came across a post wherein you can use "set -r"(on bash) to activate restricted mode ( wherein you cant run some commands such as cd etc). Can anyone guide if we have anything similar in ksh ? Thanks (2 Replies)
Discussion started by: Shivdatta
2 Replies

7. Shell Programming and Scripting

Sourcing Env file with eval works with ksh but not BASH

Hi, I am running this on Redhat 5.10 I have a simple test script called test.sh which has the following contents and it uses the BASH shebang. ------------------------------------------------------------- #!/bin/bash eval `/tmp/filereader.pl /tmp/envfile.txt` echo "TESTPATH=$TESTPATH" ... (28 Replies)
Discussion started by: waavman
28 Replies

8. Shell Programming and Scripting

ksh - variable to be set to windows path issue

Greetings Experts, I need to pass a parameter to ksh and the value is windows path eg: sh abc.txt C:\Users\chill3chee\Desktop No matter I try with \ delimiter, still could not get this exact value assigned to the shell variable which was checked with echo. Tried with using... (2 Replies)
Discussion started by: chill3chee
2 Replies

9. Shell Programming and Scripting

Getopt eval set parameters not happening when the script is called through an application!

Hi, There is an Informatica tool through which unix scripts can be called. Now the requirement in my project is that a parent script calls a child script but this parent script has to be called through the Informatica tool. In Parent script I'm using TEMP=`getopt -o x:y: -l area:,volume:... (1 Reply)
Discussion started by: Panna
1 Replies

10. UNIX for Beginners Questions & Answers

Eval set -- and more

Hello everyone, I am taking a course on Lynda and they show this code below. I didn't fully understand some parts. Please see the questions within the code. Thank you for your input and time. Regards, function usage { echo Options are -r -h -b -x --branch --version --help --exclude... (9 Replies)
Discussion started by: mohca2020
9 Replies
ldns(3) 						     Library Functions Manual							   ldns(3)

NAME
ldns_dnssec_zone_find_rrset, ldns_dnssec_zone_new, ldns_dnssec_zone_free, ldns_dnssec_zone_add_rr, ldns_dnssec_zone_names_print, ldns_dnssec_zone_print, ldns_dnssec_zone_add_empty_nonterminals SYNOPSIS
#include <stdint.h> #include <stdbool.h> #include <ldns/ldns.h> ldns_dnssec_rrsets* ldns_dnssec_zone_find_rrset(ldns_dnssec_zone *zone, ldns_rdf *dname, ldns_rr_type type); ldns_dnssec_zone* ldns_dnssec_zone_new(); void ldns_dnssec_zone_free(ldns_dnssec_zone *zone); ldns_status ldns_dnssec_zone_add_rr(ldns_dnssec_zone *zone, ldns_rr *rr); void ldns_dnssec_zone_names_print(FILE *out, ldns_rbtree_t *tree, bool print_soa); void ldns_dnssec_zone_print(FILE *out, ldns_dnssec_zone *zone); ldns_status ldns_dnssec_zone_add_empty_nonterminals(ldns_dnssec_zone *zone); DESCRIPTION
ldns_dnssec_zone_find_rrset() Find the RRset with the given name and type in the zone zone: the zone structure to find the RRset in dname: the domain name of the RRset to find type: the type of the RRset to find Returns the RRset, or NULL if not present ldns_dnssec_zone_new() Creates a new dnssec_zone structure Returns the allocated structure ldns_dnssec_zone_free() Frees the given zone structure, and its rbtree of dnssec_names Individual ldns_rr RRs within those names are *not* freed *zone: the zone to free ldns_dnssec_zone_add_rr() Adds the given RR to the zone. It find whether there is a dnssec_name with that name present. If so, add it to that, if not create a new one. Special handling of NSEC and RRSIG provided zone: the zone to add the RR to rr: The RR to add Returns LDNS_STATUS_OK on success, an error code otherwise ldns_dnssec_zone_names_print() Prints the rbtree of ldns_dnssec_name structures to the file descriptor out: the file descriptor to print the names to tree: the tree of ldns_dnssec_name structures to print print_soa: if true, print SOA records, if false, skip them ldns_dnssec_zone_print() Prints the complete zone to the given file descriptor out: the file descriptor to print to zone: the dnssec_zone to print ldns_dnssec_zone_add_empty_nonterminals() Adds explicit dnssec_name structures for the empty nonterminals in this zone. (this is needed for NSEC3 generation) zone: the zone to check for empty nonterminals return LDNS_STATUS_OK on success. AUTHOR
The ldns team at NLnet Labs. Which consists out of Jelte Jansen and Miek Gieben. REPORTING BUGS
Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html COPYRIGHT
Copyright (c) 2004 - 2006 NLnet Labs. Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
ldns_dnssec_zone. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. REMARKS
This manpage was automaticly generated from the ldns source code by use of Doxygen and some perl. 30 May 2006 ldns(3)
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy