Sponsored Content
Full Discussion: tables in scripts
Top Forums Shell Programming and Scripting tables in scripts Post 302212789 by Celine19 on Tuesday 8th of July 2008 10:42:34 AM
Old 07-08-2008
I tried this


for element in `seq 1 50`
do

$tab_T1[element] = ` expr ${tab2[element]} - ${tab1[element]} `
echo "$element"
done


but had the same error

./T1: line 57: [1]: command not found
1
./T1: line 57: [2]: command not found
2
./T1: line 57: [3]: command not found
3
./T1: line 57: [4]: command not found
4
./T1: line 57: [5]: command not found
5
...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding out tables not used in scripts.

Hi all, Please see my requirement and post me asap. Spool all the tables names into a file . Take each table name and check if it is present in any of the scripts in a directory using grep -il command. The script has to loop through the tables list and take each table and find it's presence... (7 Replies)
Discussion started by: Vasundhara
7 Replies

2. Shell Programming and Scripting

use shell scripts to update tables from databases

Hi I need to write a shell script that will access tables available on webpages and update a table on my webpage on a periodic basis. It will access, say for example a website that periodically update a table with certain quantities and update my table accordingly.it should have the flexibility... (0 Replies)
Discussion started by: wannabegeek
0 Replies

3. Shell Programming and Scripting

Converting tables of row data into columns of tables

I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated. Input: test_data_1 1 2 90% 4 3 91% 5 4 90% 6 5 90% 9 6 90% test_data_2 3 5 92% 5 4 92% 7 3 93% 9 2 92% 1 1 92% ... Output:... (7 Replies)
Discussion started by: justthisguy
7 Replies

4. UNIX for Dummies Questions & Answers

Profile scripts versus rc scripts....

what is the difference between login and profile scripts versus the rc scripts? (1 Reply)
Discussion started by: rookie22
1 Replies

5. Shell Programming and Scripting

Help with Script using rsh and scripts within scripts

Hi, I've written a script that runs on a Database server. It has to shutdown the Application server, do an Oracle Dump and then restart the Application server. Its been a long time since I wrote any shells scripts. Can you tell me if the scripts that I execute within my script will be executed... (3 Replies)
Discussion started by: brockwile1
3 Replies

6. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log The checkstatus.sh scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

7. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./script.sh I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies

8. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

9. Shell Programming and Scripting

Scripts for exporting backup from selected tables of Oracle DB

dear all please help me ! i need a script for exporting the selected tables of oracle database installed on CentOs. i waiting your response. thanks and regards (6 Replies)
Discussion started by: amirzargaran
6 Replies

10. UNIX for Advanced & Expert Users

Identify tables from Oracle sql scripts

Hi, Please let me know if you have any thoughts on how to read a table that has all the oracle sql files or shell scripts at the job and step level to identify all the tables that does merge, update, delete, insert, create, truncate, alter table (ALTER TABLE XYZ RENAME TO ABC) and call them out... (1 Reply)
Discussion started by: techmoris
1 Replies
lset(n) 						       Tcl Built-In Commands							   lset(n)

__________________________________________________________________________________________________________________________________________________

NAME
lset - Change an element in a list SYNOPSIS
lset varName ?index...? newValue _________________________________________________________________ DESCRIPTION
The lset command accepts a parameter, varName, which it interprets as the name of a variable containing a Tcl list. It also accepts zero or more indices into the list. The indices may be presented either consecutively on the command line, or grouped in a Tcl list and pre- sented as a single argument. Finally, it accepts a new value for an element of varName. If no indices are presented, the command takes the form: lset varName newValue or lset varName {} newValue In this case, newValue replaces the old value of the variable varName. When presented with a single index, the lset command treats the content of the varBane variable as a Tcl list. It addresses the index'th element in it (0 refers to the first element of the list). When interpreting the list, lset observes the same rules concerning braces and quotes and backslashes as the Tcl command interpreter; however, variable substitution and command substitution do not occur. The command constructs a new list in which the designated element is replaced with newValue. This new list is stored in the variable varName, and is also the return value from the lset command. If index is negative or greater than or equal to the number of elements in $varName, then an error occurs. If index has the value end, it refers to the last element in the list, and end-integer refers to the last element in the list minus the specified integer offset. If additional index arguments are supplied, then each argument is used in turn to address an element within a sublist designated by the previous indexing operation, allowing the script to alter elements in sublists. The command, lset a 1 2 newValue or lset a {1 2} newValue replaces element 2 of sublist 1 with newValue. The integer appearing in each index argument must be greater than or equal to zero. The integer appearing in each index argument must be strictly less than the length of the corresponding list. In other words, the lset command cannot change the size of a list. If an index is outside the permitted range, an error is reported. EXAMPLES
In each of these examples, the initial value of x is: set x [list [list a b c] [list d e f] [list g h i]] => {a b c} {d e f} {g h i} The indicated return value also becomes the new value of x (except in the last case, which is an error which leaves the value of x unchanged.) lset x {j k l} => j k l lset x {} {j k l} => j k l lset x 0 j => j {d e f} {g h i} lset x 2 j => {a b c} {d e f} j lset x end j => {a b c} {d e f} j lset x end-1 j => {a b c} j {g h i} lset x 2 1 j => {a b c} {d e f} {g j i} lset x {2 1} j => {a b c} {d e f} {g j i} lset x {2 3} j => list index out of range In the following examples, the initial value of x is: set x [list [list [list a b] [list c d]] [list [list e f] [list g h]]] => {{a b} {c d}} {{e f} {g h}} The indicated return value also becomes the new value of x. lset x 1 1 0 j => {{a b} {c d}} {{e f} {j h}} lset x {1 1 0} j => {{a b} {c d}} {{e f} {j h}} SEE ALSO
list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lsort(n), lrange(n), lreplace(n) KEYWORDS
element, index, list, replace, set Tcl 8.4 lset(n)
All times are GMT -4. The time now is 09:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy