09-05-2005
Scripting question I'm really stuck
I have this bit of code that lists one database connection, the number at the end is a variable that is passed to a sql script to measure tablespace thresholds.
I would like to add more database to the list. If i did this for example
set -A list username password GASD2.world 80
set -A list username password GASD3.world 80
set -A list username password GASD4.world 80
I would only get the one connection for GASD4. Finding very hard to explain this but if anyone can help or point me in the right direction that would be great.
THE CODE I HAVE AT THE MOMENT IS BELOW
##########################################
set -A list username password GASD2.world 80
let elements=${#list[*]}
let i=-1
while (( ++i <= elements )); do
SPACE_REPORT
(( i = i +1))
done
##########################################
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am writing a script that will identify the oldest file in a directory. Here's the syntax:
#!/bin/ksh
cd directory
chmod 777 *
ls -r -1t > file1
sed -n -e "1P" < file1 > file2
So my problem is, now I have file2, which contains the name of the oldest file in the directory. How do I use,... (1 Reply)
Discussion started by: kristy
1 Replies
2. Shell Programming and Scripting
This script searches for core files and if it finds one, it emails me to let me know.I DONT want it to email me if it doesn't find one but I can't figure out what I need to change or add. Any thoughts? Script below:
/bin/find / -name core -type f -ls -exec file {} \;|/usr/bin/mailx -s... (1 Reply)
Discussion started by: damielle
1 Replies
3. Shell Programming and Scripting
Hello
I am working on cleaning up permissions on Oracle mountpoints and datafiles in unix. I am looking for a script or a scripting idea to 1st.
1. grep for owner oracle
2. ensure its a directory owned for oracle
3. chmod 750 on the oracle owned directory.
4. grep for oracle files, etc... (3 Replies)
Discussion started by: jigarlakhani
3 Replies
4. Shell Programming and Scripting
I'm new to shell scripting and am having a problem trying to do something in C shell. I want to write a script that will input something instead of a user doing it. For example, using the command 'write' the user is supposed to type something to be sent to another user. I want a script to be able... (3 Replies)
Discussion started by: batmike
3 Replies
5. Shell Programming and Scripting
I am writing a backup script for AIX 5 and running into a problem where the output isn't being shown in the output log that is being created. Any ideas on how this would be corrected? I have included the script below. The only thing showing up in the file is listed below. I was hoping to capture... (2 Replies)
Discussion started by: justinburbridge
2 Replies
6. Shell Programming and Scripting
i have to use bash to get system information like IP address and the operating system being used, does anybody know how to do this? (10 Replies)
Discussion started by: carlvernon
10 Replies
7. Solaris
I'm writing a small script that will run an executable program (sort of like TOP). To exit the executable, you have to enter control C (^c). I'm trying to use a redirect input file to send the ^c but I'm not having any luck. My short script looks like this - /mydirectory/abc.script < abc.in >... (1 Reply)
Discussion started by: gonzotonka
1 Replies
8. Shell Programming and Scripting
Folks;
I'm writing a shell script to extract some fields out of a log file & it will run periodically, how can i make it runs starting from where it left of. for example;
if the script will do the extract every 2 days, let's say the first run will extract fields until July 25, 2007 @ 11:15:22... (1 Reply)
Discussion started by: moe2266
1 Replies
9. Shell Programming and Scripting
Hi
I am trying to write a small script which takes one by one file name from a txt file and do a 'll' and need to check if equal to the given month, otherwise it should return back the file name.
Note: the file name contains parameter.
My code is given below: It is not working .. giving error... (6 Replies)
Discussion started by: Ravindra Swan
6 Replies
10. Shell Programming and Scripting
hi all,
I am writing a script and beginner in shell scripting. I have tried the below script. could you please check and let me know whether the below scirpt is correct.
Unix details : HP Unix
Input file.
cat input.txt | tail -4
HTS40002.W1978.PROM
HTS40003.W1978.PROM... (17 Replies)
Discussion started by: arun888
17 Replies
LEARN ABOUT OSX
drop_tablespace
DROP
TABLESPACE(7) SQL Commands DROP TABLESPACE(7)
NAME
DROP TABLESPACE - remove a tablespace
SYNOPSIS
DROP TABLESPACE [ IF EXISTS ] tablespacename
DESCRIPTION
DROP TABLESPACE removes a tablespace from the system.
A tablespace can only be dropped by its owner or a superuser. The tablespace must be empty of all database objects before it can be
dropped. It is possible that objects in other databases might still reside in the tablespace even if no objects in the current database are
using the tablespace. Also, if the tablespace is listed in the temp_tablespaces setting of any active session, the DROP might fail due to
temporary files residing in the tablespace.
PARAMETERS
IF EXISTS
Do not throw an error if the tablespace does not exist. A notice is issued in this case.
tablespacename
The name of a tablespace.
NOTES
DROP TABLESPACE cannot be executed inside a transaction block.
EXAMPLES
To remove tablespace mystuff from the system:
DROP TABLESPACE mystuff;
COMPATIBILITY
DROP TABLESPACE is a PostgreSQL extension.
SEE ALSO
CREATE TABLESPACE [create_tablespace(7)], ALTER TABLESPACE [alter_tablespace(7)]
SQL - Language Statements 2010-05-14 DROP TABLESPACE(7)