I need to search a file for two values (valueA & valueB). ValueA will be on a different row than valueB, and concatenate the two together on the same row of my output.
Example: search input file for strings "node" and "OS", combine the two results into one row
input
node A
text
text
OS... (4 Replies)
I have 2 files
FILEA
1232342
1232342
2344767
4576823
2325642
FILEB
3472328
2347248
1237123
1232344
8787890
I want the output to go into a 3rd file and look like:
FILEC
1232342 3472328 (1 Reply)
Hi all
i have a file like
2006,1,2
2007,2,3
2008,3,4
I will read this and my output should be like
2006,1,2
2007,1,2
2008,1,2
2007,2,3
2008,2,3
2008,3,4
Giving the explanation, we will read the first line of the file and if the year any other than current year, we will print as many... (1 Reply)
need a shell which perform following function
file 1 ( every time new data comes)
1212
2323
3434
4545
5656
.
.
.
.
file 2 (fixed line)
update bc_tbl set aix=data , bix=back where cix=U and serial=;
now when i execute shell it will concatinate file 1, file 2 & make file 3 as... (3 Replies)
i have a file as below and i need to load it into oracle. The problem is, some of the rows are in 2 lines.
123456_PosWlist ----- ----- IN 0/0
123456_PosWListRpt ----- ----- IN 0/0
123456_PosWListCSV
----- -----... (7 Replies)
Hi guys;
TBH I am an absolute novice, when it comes to scripting; I do have an idea of the basic commands...
Here is my problem;
I have a flatfile 'A' containing a single column with multiple rows. I have to create a script which will use 'A' as input and then output a string in in the... (0 Replies)
I need to concatenate the rows that are broken (because of carriage return and line feed) in unix.
Input
123|456|789|""
987|786|"GRT
"|""
3455|896|654|456|""
457|234|"RT"|"PR
TY"|""
Output
123|456|789|""
987|786|"GRT"|""
3455|896|654|456|""
457|234|"RT"|"PRTY"|"" (16 Replies)
I'm trying to find a way to concatenate consecutive rows (key is column $1 and $2) if column $5 an $6 are integers and redefine ranges in columns $3&$4 and $5&$6
Unfortunately I'm still learning the very basics so I cannot figure a way of doing this with awk.
Input file
15 30 21 21 25.0... (11 Replies)
Hi all,
i need a bash script.
I have a 3 file named Milano, Torino, Firenze
Into file i have:
Milano
Marco
Luca
Giorgio
Michele
PatrizioTorino
Marco
Giulio
Emilio
MicheleFirenze
Luca
Giorgio
Marco
Saverio
EmilioThe output should be a all_city.csv file like: (3 Replies)
Discussion started by: kamose
3 Replies
LEARN ABOUT PHP
pg_copy_from
PG_COPY_FROM(3)PG_COPY_FROM(3)pg_copy_from - Insert records into a table from an arraySYNOPSIS
bool pg_copy_from (resource $connection, string $table_name, array $rows, [string $delimiter], [string $null_as])
DESCRIPTION pg_copy_from(3) inserts records into a table from $rows. It issues a COPY FROM SQL command internally to insert records.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $table_name
- Name of the table into which to copy the $rows.
o $rows
- An array of data to be copied into $table_name. Each value in $rows becomes a row in $table_name. Each value in $rows should be
a delimited string of the values to insert into each field. Values should be linefeed terminated.
o $delimiter
- The token that separates values for each field in each element of $rows. Default is TAB.
o $null_as
- How SQL NULL values are represented in the $rows. Default is N ("\N").
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
pg_copy_from(3) example
<?php
$db = pg_connect("dbname=publisher") or die("Could not connect");
$rows = pg_copy_to($db, $table_name);
pg_query($db, "DELETE FROM $table_name");
pg_copy_from($db, $table_name, $rows);
?>
SEE ALSO pg_copy_to(3).
PHP Documentation Group PG_COPY_FROM(3)