05-02-2010
Hi Shafi
Its not clear what exactly you are trying to ask because if i had understood you correctly, the answer which you are looking for is present in the example which you provided, the set command.
However, if the set command which you have shown is throwing error, the only reason i could think of is the variable "account_pass" did not have any initial value, and hence it fails.
If this is not what you are looking for, please show us the error that you have encountered.
Thanks
Guru.
Last edited by Scott; 05-04-2010 at 08:37 AM..
Reason: Removed self-promotion link
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to launch some shell scripts.
I would have the possibility to change the number of shell scripts launched dynamically by modifying a variable, or a configuration file.
For example, I start to launch 4 scripts at the same time, and after that, by modifying a variable, 6 scripts are... (0 Replies)
Discussion started by: gonzo38
0 Replies
2. Shell Programming and Scripting
I have two files as Count1 and Count2. The count contains only one values as 10 and count2 contains only one
values as 20. Now I want third file Count3 as count1+Count2. That is it should contain sum of two file(10+20=30) (3 Replies)
Discussion started by: Shell_Learner
3 Replies
3. Shell Programming and Scripting
I have the following script in a shell
# The start of a filename
file=$(ls -tr $EMT*.dat | tail -1) # Select the latest file echo $file
file_seq=$( < /u02/sct/banner/bandev2/xxxxxx/misc/EFTSQL.dat)
echo $file_seq
file2 = '$file_seq + 1'
echo $file2
It is reading a file EFTSQL.dat... (3 Replies)
Discussion started by: rechever
3 Replies
4. Shell Programming and Scripting
Hi,
I need to generate the text name dynamically in for loop,
ex,
VAR_COPY_FILE1= file path 1
VAR_COPY_FILE2= file path 2
VAR_COPY_FILE3= file path 3
for i in 1 2 3
do
if
then
"do some process here"
fi
done (3 Replies)
Discussion started by: msubash26
3 Replies
5. UNIX for Advanced & Expert Users
In one of the assignment which i am working on, i am am trying to insert keys and values into BDB by reading the input records from a input file as below.
Here keys i am inserting as character buffer and for values i am dynamically allocating the memory using malloc and then inserting into bdb.... (1 Reply)
Discussion started by: AmbikaValagonda
1 Replies
6. Programming
In one of the assignment which i am working on, i am am trying to insert keys and values into BDB by reading the input records from a input file as below.
Here keys i am inserting as character buffer and for values i am dynamically allocating the memory using malloc and then inserting into bdb.... (1 Reply)
Discussion started by: AmbikaValagonda
1 Replies
7. Shell Programming and Scripting
Hi all,
In ksh, I'm trying to loop through all of my arrays, named array1, array2, array3..., and update the indices. But I'm getting errors and I'm not sure how to fix them. The errors are
./parse.sh: 6+1: not found
The code is:
eval \${array$c}=$(eval \${array$c}+1 )
Any help... (12 Replies)
Discussion started by: nicksantos1
12 Replies
8. UNIX for Dummies Questions & Answers
Dear all,
I need your help for my question please
I have without header (space separated) and need to add two colomns at the beginning with values
my file look like :
rs1 a t 0.6
rs2 a c 0.3
rs3 t g 0.8
I need to a new file like:
1 100 rs1 a t 0.6
1 100 rs2 a c 0.3
1 100 rs3 t g... (3 Replies)
Discussion started by: biopsy
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have 2 files which i need to merge together based on the column names provided in the file. The first line in both files are header records.
The first file has fixed columns but second file can have subset of the columns from file 1
File 1:
... (6 Replies)
Discussion started by: kushagra
6 Replies
10. Shell Programming and Scripting
Hi all,
Does anyone know if it possible to append a parameter to a function name?
Something like the following:
function tnsrec_${SERVICE_NAME} {
code..
}
Any ideas? (6 Replies)
Discussion started by: jonnyd
6 Replies
LEARN ABOUT OPENDARWIN
error
error(n) Tcl Built-In Commands error(n)
__________________________________________________________________________________________________________________________________________________
NAME
error - Generate an error
SYNOPSIS
error message ?info? ?code?
_________________________________________________________________
DESCRIPTION
Returns a TCL_ERROR code, which causes command interpretation to be unwound. Message is a string that is returned to the application to
indicate what went wrong.
If the info argument is provided and is non-empty, it is used to initialize the global variable errorInfo. errorInfo is used to accumulate
a stack trace of what was in progress when an error occurred; as nested commands unwind, the Tcl interpreter adds information to errorInfo.
If the info argument is present, it is used to initialize errorInfo and the first increment of unwind information will not be added by the
Tcl interpreter. In other words, the command containing the error command will not appear in errorInfo; in its place will be info. This
feature is most useful in conjunction with the catch command: if a caught error cannot be handled successfully, info can be used to return
a stack trace reflecting the original point of occurrence of the error:
catch {...} errMsg
set savedInfo $errorInfo
...
error $errMsg $savedInfo
If the code argument is present, then its value is stored in the errorCode global variable. This variable is intended to hold a machine-
readable description of the error in cases where such information is available; see the tclvars manual page for information on the proper
format for the variable. If the code argument is not present, then errorCode is automatically reset to ``NONE'' by the Tcl interpreter as
part of processing the error generated by the command.
SEE ALSO
catch(n), tclvars(n)
KEYWORDS
error, errorCode, errorInfo
Tcl error(n)