08-18-2005
If I knew the names of the properties in the file I could do that. But sample.properties is a simplified example. I actually have over 100 properties in the file I need to process, and I'd rather do it in a loop than hard-code all of my property names.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there - am newish to shell scripting and would appreciate some advice on this...
Am trying to use what I have seen called 'compound variables' in other langs but with no success in my shell script. This is the kind of thing I'm trying to do:
base_val=123
stop=3
x=1
while
do
... (3 Replies)
Discussion started by: neemic
3 Replies
2. Shell Programming and Scripting
Erase the space in assigment operator.
array_var=`expr $base_val + $x` (1 Reply)
Discussion started by: irina
1 Replies
3. Shell Programming and Scripting
The construct ${#parameter} returns the number of characters in the parameter and ${!parameter} specifies an indirect variable. My question is: How do I combine these two. What I want is ${#!parameter} but this gives an error.
Of course I can use:
dummy=${!parameter}
${#dummy}
but that's a... (0 Replies)
Discussion started by: gone_bush
0 Replies
4. Shell Programming and Scripting
in a text " Korn Shell Unix programming Manual 3° Edition"
i have found this sintax to declare a compoud variable:
variable=(
fild1 (0 Replies)
Discussion started by: ZINGARO
0 Replies
5. Shell Programming and Scripting
in a text " Korn Shell Unix programming Manual 3° Edition"
i have found this sintax to declare a compoud variable:
variable=(
fild1
fild1
)
but this sintax in ksh and sh (HP-UNIX) not work...
why?? exist another solution for this type of variable ??? (5 Replies)
Discussion started by: ZINGARO
5 Replies
6. Linux
Hi,
I've got a small problem.
If varible A stores "B" and Variable B stores C,
How to get the value of variable B by using only Variable A..?
I tried the following but didnt work pease help..
$ var1=vikram
$ echo $var1
vikram
$ vikram=sampath
$ echo $vikram
sampath
$ echo... (6 Replies)
Discussion started by: vickramshetty
6 Replies
7. Shell Programming and Scripting
Hi
I have variable A_B=alpha
also var1="A"
var2="B"
I want to retrieve the value alpha using var1 and var2 , somthing like
echo ${${var1}_${var2}} that works. Obviously this is receiving syntax
error (6 Replies)
Discussion started by: sumir
6 Replies
8. Shell Programming and Scripting
Hello,
Here is my problem using KSH
I have a set of compound variables, let say cmp_var1 cmp_var2
The names of these variables are stored in an indexed array.
How can I access the subfields of these compound variables ?
I tried:
set -A cmp_varnames=(cmp_var1 cmp_var2)
for cmp in... (4 Replies)
Discussion started by: luky55
4 Replies
9. Shell Programming and Scripting
Hello,
I've spent hours this morning reading various past forum posts and documentation pages but I can't find exactly what I need.
I'm trying to call a variable with a variable in the name without having to make a third variable.
For example:
path=AB
legAB=50
leg$path
I want to... (8 Replies)
Discussion started by: DFr0st
8 Replies
LEARN ABOUT FREEBSD
ofwdump
OFWDUMP(8) BSD System Manager's Manual OFWDUMP(8)
NAME
ofwdump -- examine the Open Firmware device tree
SYNOPSIS
ofwdump -a [-p | -P property] [-R | -S]
ofwdump [-p | -P property] [-r] [-R | -S] [--] nodes
DESCRIPTION
The ofwdump utility is used to examine the Open Firmware device tree. In the first synopsis form, the complete device tree is printed; in
the second form, only the selected nodes will be examined.
The following options are available:
-a Print the complete device tree.
-p Print all available properties.
-P property Only print properties of the given name.
-R Print properties in ``raw'' format, i.e., omit all headings and indentation and just write the property values unaltered to the
standard output. This is intended to be used with the -P option to extract the value of a single property.
-S Print properties as strings; this is analogous to the -R option, except that each property is only output to the first NUL char-
acter, and that newline is appended to each.
-r Recursively print all children of the specified nodes.
EXAMPLES
Print the complete device tree:
ofwdump -a
Print the complete device subtree of the ``/pci'' node, including all available properties:
ofwdump -pr /pci
Print the ``compatible'' property of the ``/pci'' node as plain string:
ofwdump -P compatible -S /pci
SEE ALSO
eeprom(8)
HISTORY
The ofwdump utility first appeared in FreeBSD 5.0.
AUTHORS
The ofwdump utility was written by Thomas Moestl <tmm@FreeBSD.org>.
BSD
October 18, 2002 BSD