Sponsored Content
Top Forums Shell Programming and Scripting Complex data sorting in excel files or text files Post 302653149 by AAWT on Friday 8th of June 2012 12:44:21 PM
Old 06-08-2012
Thanks a lot,,
but its only giving me counts like, 5432, 0r 2345

for A and C
is it possible to get new file with all A or C or A C pairs

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sorting files with find command before sending to text file

i need help with my script.... i am suppose to grab files within a certain date range now i have done that already using the touch and find command (found them in other threads) touch -d "$date_start" ./tmp1 touch -d "$date_end" ./tmp2 find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
Discussion started by: deking
6 Replies

2. Shell Programming and Scripting

PERL: Split Excel Workbook to Indiv Excel files

Hi, I am trying to find a way to read an excel work book with multiple worksheets. And write each worksheet into a new excel file using perl. My environment is Unix. For example: I have an excel workbook TEST.xls and it has Sheet1, Sheet2, Sheet3 worksheets. I would like to create... (2 Replies)
Discussion started by: sandeep78
2 Replies

3. Shell Programming and Scripting

sorting from several files for a specific data

Please assist: I have several files and all of the files have the same data format like following: All I need to get item next to "name" field and the "address" field from each file which has only 8 characters in "name" field. so the output should be: ams00ark(spcae)10.1.1.12... (3 Replies)
Discussion started by: amir07
3 Replies

4. Shell Programming and Scripting

Attaching two text files in two different sheet in same excel

Hi, My requirement is to get attach two different text file contents to two different sheets in same excelsheet. Also, is there any way we can name the tabs as desired ? Kindly assist. (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies

5. Shell Programming and Scripting

Need help on inserting data from text file to excel using shell script

Hi, Please help me on this. I want to insert data from text file to excel using shell script nawk -v r=4 -v c=4 -v val=$a -F, 'BEGIN{OFS=","}; NR != r; NR == r {$c = val; print}' "file.csv" I used above one to insert $a value in 4th row, 4th column in an excel file.csv and it... (3 Replies)
Discussion started by: suman.frnz
3 Replies

6. Shell Programming and Scripting

How to write text file data to excel using UNIX shell script?

Hi All, I have the requirement in unix shell script. I want to write the "ls -ltr" command out put to excel file as below. Input :text file data : drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x 2 apx aim 4096 Nov 29 18:40 drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x... (10 Replies)
Discussion started by: Balasankar
10 Replies

7. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

8. Shell Programming and Scripting

Sorting indented text files

Hello, I'm trying to find a solution or a proper tool for the following job: I need to sort a text document with indented sections, so all levels of indentation are sorted independently for each section. Particularly, I need this for Cisco routers' running config files to compare them with... (2 Replies)
Discussion started by: kobel
2 Replies

9. UNIX for Dummies Questions & Answers

Unexplained text in data files

Has anyone ever encountered text from other files suddenly appearing in another data file that is not being used. There does not seem to be any reason for it, any thoughts would be useful. Thanks (14 Replies)
Discussion started by: SRoberts
14 Replies

10. Shell Programming and Scripting

Merge and Sort tabular data from different text files

I have 42 text files; each containing up to 34 lines with following structure; file1 H-01 23 H-03 5 H-05 9 H-02 14 . . file2 H-01 17 H-02 43 H-04 7 H-05 8 H-03 7 . . file3 (6 Replies)
Discussion started by: Syeda Sumayya
6 Replies
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)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy