Hi thanks a lot . It worked , I have another problem as when I am redirecting the output to a file it doesn't connect to database.Pls suggest.thanks in advance
Last edited by Don Cragun; 05-07-2014 at 12:18 AM..
Reason: Change HTML tags to CODE tags.
hi
the code i ve written is as follows:
command="egrep ',100,|,200,' | wc -l"
count =`cat trial.txt | $command`
echo "$count"
the contents of
trial.txt is :
000,100,200,300,
001,200,100,201,
002,200,100,400,
i need to get the count using the command stored in a variable and using... (2 Replies)
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
When I run this:
PDHDURL=`/usr/bin/curl --silent http://www.phdcomics.com/comics.php | /usr/bin/grep -o http://www.phdcomics.com/comics/archive/.*.gif | head -1`
echo -e "$PHDURL"
It is totally blank. However, when I just run it from the terminal:
/usr/bin/curl --silent... (2 Replies)
can anyone please help me with this:
i have written a shell script and a stored procedure which has one OUT parameter. now i want to use that out parameter as an input to the unix script but i am getting an error as variable not found. below are the unix scripts and stored procedure...
... (4 Replies)
Hi,
Good Day,
I had this question in my mind.Hope someone can give me his/her thought about it.
Question: I had a binary files stored in the nfs system and mounted several workstation locally and running as deamon. Is there in effect to the networks or any problem me arise regarding network... (3 Replies)
Hello all,
I am trying to run stored procrdure from shell script which takes one argument. And also I want to verify in the script whether the script executed successfully. However the Stored procedure is not running from shell script. Manually if I run it update the data in the table.
Can... (29 Replies)
Hi Everyone,
I want to create a script where i need to run the oracle stored procedure from unix script and get the output(sequence number ) into a variable which i will pass in my datastage job.
Below is my stored procedure:-
DECLARE
P_TRANSTYPE VARCHAR2(20);
... (4 Replies)
hey, i have stored values of query like this
val_2=$( sqlplus -s rte/rted1@rel75d1 << EOF
set heading off
select source_id from cvt_istats where istat_id > $val_1;
exit
EOF
)
echo $val_2
now , val_2 has five values displayed like this
1
2
3
4
5
what i have to do is to check the... (1 Reply)
Hi All,
I have below variable,
xyz=\$AI_XFR
Now, if you will run the below command
=> echo $xyz
$AI_XFR
It is returning hardcoded string value.
Whereas in environment, there is value in it. Like below:
=> echo $AI_XFR
/home/aditya/sandbox/xfr/
I need to resolve this... (4 Replies)
Discussion started by: adgangwar
4 Replies
LEARN ABOUT OSX
clusterdb
CLUSTERDB(1) PostgreSQL Client Applications CLUSTERDB(1)NAME
clusterdb - cluster a PostgreSQL database
SYNOPSIS
clusterdb [ connection-option... ] [ [ --verbose ] [ -v ] ] [ --table | -t table ] [ dbname ]
clusterdb [ connection-option... ] [ [ --all ] [ -a ] ] [ [ --verbose ] [ -v ] ]
DESCRIPTION
clusterdb is a utility for reclustering tables in a PostgreSQL database. It finds tables that have previously been clustered, and clusters
them again on the same index that was last used. Tables that have never been clustered are not affected.
clusterdb is a wrapper around the SQL command CLUSTER [cluster(7)]. There is no effective difference between clustering databases via this
utility and via other methods for accessing the server.
OPTIONS
clusterdb accepts the following command-line arguments:
-a
--all Cluster all databases.
[-d] dbname
[--dbname] dbname
Specifies the name of the database to be clustered. If this is not specified and -a (or --all) is not used, the database name is
read from the environment variable PGDATABASE. If that is not set, the user name specified for the connection is used.
-e
--echo Echo the commands that clusterdb generates and sends to the server.
-q
--quiet
Do not display progress messages.
-t table
--table table
Cluster table only.
-v
--verbose
Print detailed information during processing.
clusterdb also accepts the following command-line arguments for connection parameters:
-h host
--host host
Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory
for the Unix domain socket.
-p port
--port port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections.
-U username
--username username
User name to connect as.
-w
--no-password
Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as
a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to
enter a password.
-W
--password
Force clusterdb to prompt for a password before connecting to a database.
This option is never essential, since clusterdb will automatically prompt for a password if the server demands password authentica-
tion. However, clusterdb will waste a connection attempt finding out that the server wants a password. In some cases it is worth
typing -W to avoid the extra connection attempt.
ENVIRONMENT
PGDATABASE
PGHOST
PGPORT
PGUSER Default connection parameters
This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see in the documentation).
DIAGNOSTICS
In case of difficulty, see CLUSTER [cluster(7)] and psql(1) for discussions of potential problems and error messages. The database server
must be running at the targeted host. Also, any default connection settings and environment variables used by the libpq front-end library
will apply.
EXAMPLES
To cluster the database test:
$ clusterdb test
To cluster a single table foo in a database named xyzzy:
$ clusterdb --table foo xyzzy
SEE ALSO
CLUSTER [cluster(7)]
Application 2010-05-14 CLUSTERDB(1)