10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a shell script containing multiple PSQL queries for which I want the output to be redirected to a text file.
psql -U postgres -d database -o textfile.txt << EOF
Query1;
Query2;
Query ....;
EOF
When executing the script, queries outputs are directed to textfile.txt, however... (2 Replies)
Discussion started by: nms
2 Replies
2. Shell Programming and Scripting
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
Discussion started by: winston6071
0 Replies
3. Shell Programming and Scripting
cmd()
{
echo " "
echo "$(whoami)@$(hostname):$(pwd)# $*"
results=`eval $*`
echo $results
}
I want to get the eval $* 's return value and pass it to a new variable $val, and get "eval $*" 's the ... (7 Replies)
Discussion started by: yanglei_fage
7 Replies
4. Shell Programming and Scripting
Hi All,
There are 2 scripts A and B.
A --> It will invoke script B
B -->
It will generate below output.
100 - connected
105 - Not Connected
210 - Connected
I want to return this value to script A. Please advice. (4 Replies)
Discussion started by: Girish19
4 Replies
5. Shell Programming and Scripting
Hey All,
Quick question...
I'm writing a short script to check if a continuous port is running on a server.
I'm using "ps -ef | grep -v grep | grep processName" and I was wondering if it was better/more reliable to just check the
return code from the command or if its better to pipe to... (12 Replies)
Discussion started by: mrm5102
12 Replies
6. Programming
Well as the title describes, its a pretty straight forward problem. I have a series of psql tables where there are lots of blanks. However there is at least one column, called name, that will never be blank. I want to write a select statement to get all of the contents of the table and then turn... (3 Replies)
Discussion started by: wxornot
3 Replies
7. Windows & DOS: Issues & Discussions
Hi,
I have installed cygwin on my windows XP system. And I am trying to use the following code snippet:
set SERVER="grep JDBCConnectionPool config.xml | gawk -F; '{print $2}'"
sed -i 's/%SERVER%/WLMDEVDB1/' config.xml
But it doesn't work because at runtime %SERVER% gets replaced by "grep... (2 Replies)
Discussion started by: illcar
2 Replies
8. Shell Programming and Scripting
Hi All
I have what seems to be something quite trivial but for the life of me can't work out a solution.
Basically, I have the following script that reads a version report that contains certain flags. If a condition is true, I want to print the value of column 2, sort them uniquely and return... (2 Replies)
Discussion started by: kingpin2502
2 Replies
9. UNIX and Linux Applications
Segregated the problematic portion, and showing for your view here.,
1. Following is the function definition,
create or replace function new_del(id integer) returns void as $$
begin
raise info 'dollar :%',$1;
delete from testing where id=$1;
end ;
$$
language 'plpgsql';
... (1 Reply)
Discussion started by: thegeek
1 Replies
10. Shell Programming and Scripting
Hi All,
How to access the postgreSQL from a perl script?
Thanks in advance
JS (2 Replies)
Discussion started by: jisha
2 Replies