05-04-2006
Thats gr8888! A Million thanks to you...
Itz working perfect...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All...
I want to remove blank spaces in file . I just leraned that we can use
" cat <Input filename> | tr -s ‘ ‘ > <Target file name> "
i also know with SED we can replace a blank space by other character by
sed s/ /*/g filename.
Please let me know how can i do that by... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
2. Shell Programming and Scripting
Hi,
I need a help in deleting extra spaces in a text.
I have a huge file, a part of it is :-
3 09/21/08 03:32:07 started undef mino Oracle nmx004.wwdc.numonyx.com Message Text : The Oracle session with the PID 1103 has a CPU time ... (6 Replies)
Discussion started by: vikas027
6 Replies
3. Shell Programming and Scripting
Hi,
I have a source file as mentioned below: I want to remove all the extra spaces between the fields.
a b--------|sa df-------|3232---|3
sf sa------|afs sdf-----|43-----|33
a b c------|adfsa dsf---|23-32|23
*Here '-' idicates spaces
Now, I want output as below:
a b|sa df|3232|3... (7 Replies)
Discussion started by: srilaxmi
7 Replies
4. Shell Programming and Scripting
Hi,
I have a string like this and i want to remove extra spaces that exists between the words.
Here is the sentence.
$string="The small DNA genome of hepadnaviruses is replicated by reverse transcription via an RNA intermediate. This RNA "pregenome" contains ... (2 Replies)
Discussion started by: vanitham
2 Replies
5. Shell Programming and Scripting
Suppose, I have a variable var=" name is ".
I want to remove the blank spaces from the begining and endonly, not from the entire string.
So, that the variable/string looks like following
var="name is".
Please look after the issue. (3 Replies)
Discussion started by: mady135
3 Replies
6. Shell Programming and Scripting
I have a file which contains certain records about users. the row length is always fixed to 205 characters.
Now I want to read each record line from the file, substring some portion out of it and put into another file. But I have observed that my script is trimming the extra spaces I have used for... (4 Replies)
Discussion started by: Pramit
4 Replies
7. Shell Programming and Scripting
HI,
I need the help from the experts like I have created one file with text like:
a b c d
e f g h
i j k l
So my question is that i have to write the script in which like in the first sentence it will take only one space after d and remove all the extra space in the end.I dont... (8 Replies)
Discussion started by: bhanudhingra
8 Replies
8. Shell Programming and Scripting
Hi guru's,
I am trying to write a script to generate a csv file by connecting to database run a query and put the values into csv file.
But the problem i face is i am getting lot of space after one value.how can i remove those values?.
Please help.
#!/bin/bash
export... (2 Replies)
Discussion started by: karingulanagara
2 Replies
9. UNIX Desktop Questions & Answers
I have a file of about 10k records and eace line is having an extra space of 5 byte at the end.. Iwant to remove the extra spaces at the end of each line.. Can someone please help me out.. I tried using sed command and its not working... can someone please help me out. (3 Replies)
Discussion started by: rammohan
3 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I want to remove all extra spaces, line breaks .
Need a new line entry only for term starting"array"
For eg: my input is
array(),
array(),
array(),
and my expected output is
array(),
array(),
array(),
Is it possible using awk? (5 Replies)
Discussion started by: rsi.245
5 Replies
LEARN ABOUT PHP
pg_pconnect
PG_PCONNECT(3) PG_PCONNECT(3)
pg_pconnect - Open a persistent PostgreSQL connection
SYNOPSIS
resource pg_pconnect (string $connection_string, [int $connect_type])
DESCRIPTION
pg_pconnect(3) opens a connection to a PostgreSQL database. It returns a connection resource that is needed by other PostgreSQL functions.
If a second call is made to pg_pconnect(3) with the same $connection_string as an existing connection, the existing connection will be
returned unless you pass PGSQL_CONNECT_FORCE_NEW as $connect_type.
To enable persistent connection, the pgsql.allow_persistent php.ini directive must be set to "On" (which is the default). The maximum num-
ber of persistent connection can be defined with the pgsql.max_persistent php.ini directive (defaults to -1 for no limit). The total number
of connections can be set with the pgsql.max_links php.ini directive.
pg_close(3) will not close persistent links generated by pg_pconnect(3).
PARAMETERS
o $connection_string
- The $connection_string can be empty to use all default parameters, or it can contain one or more parameter settings separated by
whitespace. Each parameter setting is in the form keyword = value. Spaces around the equal sign are optional. To write an empty
value or a value containing spaces, surround it with single quotes, e.g., keyword = 'a value'. Single quotes and backslashes
within the value must be escaped with a backslash, i.e., ' and \. The currently recognized parameter keywords are: $host,
$hostaddr, $port, $dbname, $user, $password, $connect_timeout, $options, $tty (ignored), $sslmode, $requiressl (deprecated in
favor of $sslmode), and $service. Which of these arguments exist depends on your PostgreSQL version.
o $connect_type
- If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection is created, even if the $connection_string is identical to an exist-
ing connection.
RETURN VALUES
PostgreSQL connection resource on success, FALSE on failure.
EXAMPLES
Example #1
Using pg_pconnect(3)
<?php
$dbconn = pg_pconnect("dbname=mary");
//connect to a database named "mary"
$dbconn2 = pg_pconnect("host=localhost port=5432 dbname=mary");
// connect to a database named "mary" on "localhost" at port "5432"
$dbconn3 = pg_pconnect("host=sheep port=5432 dbname=mary user=lamb password=foo");
//connect to a database named "mary" on the host "sheep" with a username and password
$conn_string = "host=sheep port=5432 dbname=test user=lamb password=bar";
$dbconn4 = pg_pconnect($conn_string);
//connect to a database named "test" on the host "sheep" with a username and password
?>
SEE ALSO
pg_connect(3), Persistent Database Connections.
PHP Documentation Group PG_PCONNECT(3)