Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Hi
I want to append line 2n to 2n-1 line where n=1...LastLine in my file.
eg:
Actual File:
Hello
Everyone
Welcome
TO Unix
I need
Your help
Required File:
HelloEveryone
WelcomeTO Unix
I needYour help (5 Replies)
hi guys, today i'm stuck in a new problem.
the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example.
I have different html files and each of them have a consecutive lines group inside that i want to extract.
example:
... (8 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi. How can I read row number from one file and print that corresponding record present at that row in another file.
eg
file1
1
3
5
7
9
file2
11111
22222
33333
44444
55555
66666
77777
88888
99999 (3 Replies)
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here.
Original File 1:
... (36 Replies)
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).
The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Hi All ,
I have to write one Perl script in which I need to read one pre-existing xls and based on pattern match for one word in some cells of the XLS , I need to fill the entire row with one color of that matched cell and write the content to another excel
Please find the below stated... (2 Replies)
Hi,
I have a comma separated file. I would like to print every alternate columns into a new row.
Example input file:
Name : John, Age : 30, DOB : 30-Oct-2018
Example output:
Name,Age,DOB
John,30,30-Oct-2018 (3 Replies)
Discussion started by: Lini
3 Replies
LEARN ABOUT PHP
fbsql_fetch_assoc
FBSQL_FETCH_ASSOC(3) 1 FBSQL_FETCH_ASSOC(3)fbsql_fetch_assoc - Fetch a result row as an associative arraySYNOPSIS
array fbsql_fetch_assoc (resource $result)
DESCRIPTION
Calling fbsql_fetch_assoc(3) is equivalent to calling fbsql_fetch_array(3) with FBSQL_ASSOC as second parameter. It only returns an asso-
ciative array.
This is the way fbsql_fetch_array(3) originally worked. If you need the numeric indices as well as the associative, use
fbsql_fetch_array(3).
An important thing to note is that using fbsql_fetch_assoc(3) is NOT significantly slower than using fbsql_fetch_row(3), while it provides
a significant added value.
PARAMETERS
o $
result -A result identifier returned by fbsql_query(3) or fbsql_db_query(3).
RETURN VALUES
Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows.
If two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the
same name, you must use fbsql_fetch_array(3) and have it return the numeric indices as well.
EXAMPLES
Example #1
fbsql_fetch_assoc(3) example
<?php
fbsql_connect($host, $user, $password);
$result = fbsql_db_query("database", "select * from table");
while ($row = fbsql_fetch_assoc($result)) {
echo $row["user_id"];
echo $row["fullname"];
}
fbsql_free_result($result);
?>
SEE ALSO fbsql_fetch_row(3), fbsql_fetch_array(3), fbsql_fetch_object(3).
PHP Documentation Group FBSQL_FETCH_ASSOC(3)