This might help, but i have a feeling the problem is more complex than you mentioned. You need to fill the arrays with your values correspondingly. If "aaa" is expected to be followed by "bbb" then you need to have "aaa" as array element in achFirst[] and "bbb" as the array element with the same index in achSecond[].
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
I want to set a variable to be any number of dashes. Rather than doing the following:
MYVAR="------------------"
I'd like to be able to set the variable to, say, 80 dashes but don't want to have to count 80 dashes. Is there a way to do this? (2 Replies)
L=0
cat test.sh | while read line
do
L='expr $1 + 1'
echo $L
done
echo $l
>>> the echo $L at the end produces 0 but i actually want it to produce the number of lines - any idea why this is happening? (16 Replies)
How do you set a varible with information that contains a string and also another variable? For example:
subject="Attention: $name / This $type needs your attention"
The $xxxx are of course other variables that I instantiated earlier. Is it like Java where you have to use double quotes and... (1 Reply)
In my script, I have the following command....
du -sk `ls -ltd sales12|awk '{print $11}'`|awk '{print $1}'
it returns the value
383283
I want to modify my script to capture that value into a variable. So, I try doing the following...
var1=`du -sk `ls -ltd sales12|awk '{print... (5 Replies)
I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat.
how can i do this???
... (2 Replies)
Hi all,
If anyone has the explanation for the following issue, please share it with me.
I am comparing two variable a and b with the values of 007 and 7, for these values it get evaluated as True. For a=008 and b=8, for these values it get evaluated as false.
#!/bin/tclsh
set a 007 ... (3 Replies)
I'm using clustered zones on my machine. i'm only at the test phase of my design and ultimately the oracle zones will be using VxVM.
When the testing phase is complete, VxVM will be used in the containers. It is necessary for VxVM to run in the global zone for the containers to use it (is... (5 Replies)
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
LEARN ABOUT BSD
typeset
typeset(1) User Commands typeset(1)NAME
typeset, whence - shell built-in functions to set/get attributes and values for shell variables and functions
SYNOPSIS
typeset [ +- HLRZfilrtux [n]] [ name [ = value]]...
whence [-pv] name...
DESCRIPTION
typeset sets attributes and values for shell variables and functions. When typeset is invoked inside a function, a new instance of the
variables name is created. The variables value and type are restored when the function completes. The following list of attributes may be
specified:
-H This flag provides UNIX to host-name file mapping on non-UNIX machines.
-L Left justify and remove leading blanks from value. If n is non-zero it defines the width of the field; otherwise, it is determined
by the width of the value of first assignment. When the variable is assigned to, it is filled on the right with blanks or trun-
cated, if necessary, to fit into the field. Leading zeros are removed if the -Z flag is also set. The -R flag is turned off.
-R Right justify and fill with leading blanks. If n is non-zero it defines the width of the field, otherwise it is determined by the
width of the value of first assignment. The field is left filled with blanks or truncated from the end if the variable is reas-
signed. The -L flag is turned off.
-Z Right justify and fill with leading zeros if the first non-blank character is a digit and the -L flag has not been set. If n is
non-zero it defines the width of the field; otherwise, it is determined by the width of the value of first assignment.
-f The names refer to function names rather than variable names. No assignments can be made and the only other valid flags are -t, -u
and -x. The flag -t turns on execution tracing for this function. The flag -u causes this function to be marked undefined. The
FPATH variable will be searched to find the function definition when the function is referenced. The flag -x allows the func-
tion definition to remain in effect across shell procedures invoked by name.
-i Parameter is an integer. This makes arithmetic faster. If n is non-zero it defines the output arithmetic base; otherwise, the
first assignment determines the output base.
-l All upper-case characters are converted to lower-case. The upper-case flag, -u is turned off.
-r The given names are marked readonly and these names cannot be changed by subsequent assignment.
-t Tags the variables. Tags are user definable and have no special meaning to the shell.
-u All lower-case characters are converted to upper-case characters. The lower-case flag, -l is turned off.
-x The given names are marked for automatic export to the environment of subsequently-executed commands.
The -i attribute can not be specified along with -R, -L, -Z, or -f.
Using + rather than - causes these flags to be turned off. If no name arguments are given but flags are specified, a list of names (and
optionally the values) of the variables which have these flags set is printed. (Using + rather than - keeps the values from being
printed.) If no names and flags are given, the names and attributes of all variables are printed.
For each name, whence indicates how it would be interpreted if used as a command name.
The -v flag produces a more verbose report.
The -p flag does a path search for name even if name is an alias, a function, or a reserved word.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO ksh(1), set(1), sh(1), attributes(5)SunOS 5.10 1 Feb 1995 typeset(1)