Thanks for the swift response but still facing the same. As I am guessing the row having double quotes that's way it is comparing. still unable to find the root cause.
error message
0403-012 A test command parameter is not valid.
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'm totally new to this forum and to awk.
I have what I thought was a simple problem, but I can't get anything to work. Here is an example input file:
3.85 4018.4
3.9 4068.4
3.95 4082.9
4 4099.7
# Property:.......etc.
0 4733.3
0.05 4659.7
0.1 4585.6
0.15 4466.2
Two... (2 Replies)
Dear linux experts,
I'd like to ask for your support, I've read some posts in this forum about files comparison but haven't found what I'm looking for. I need to create a sequential script to compare row-by-row one file with 34 similar files but without success so far. This is what I get:
... (2 Replies)
Hi,
I need help on doing the below thing in shell script.
I have a file with millions of rows called "abc.txt". i have another file with millions of rows called "xyz.txt".
I would like to do the below operation.
Open the abc.txt, read the first line, do some operations on the column... (2 Replies)
Hello Everyone,
My issue is that I want to traverse a database table row by row and do some action on the value retrieved in each row.
I have gone through a lot of shell script questions/posts. I could find row by row traversal of a file but not a database table.
Please help.
Thanks &... (5 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)
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)
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 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)
Discussion started by: aachave1
0 Replies
LEARN ABOUT PHP
mysql_fetch_row
MYSQL_FETCH_ROW(3) 1 MYSQL_FETCH_ROW(3)mysql_fetch_row - Get a result row as an enumerated arraySYNOPSIS
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should
be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
omysqli_fetch_row(3)
o PDOStatement::fetch
array mysql_fetch_row (resource $result)
DESCRIPTION
Returns a numerical array that corresponds to the fetched row and moves the internal data pointer ahead.
o $
result -The result resource that is being evaluated. This result comes from a call to mysql_query(3).
Returns an numerical array of strings that corresponds to the fetched row, or FALSE if there are no more rows.
mysql_fetch_row(3) fetches one row of data from the result associated with the specified result identifier. The row is returned as an
array. Each result column is stored in an array offset, starting at offset 0.
Example #1
Fetching one row with mysql_fetch_row(3)
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
echo $row[0]; // 42
echo $row[1]; // the email value
?>
Note
This function sets NULL fields to the PHP NULL value.
mysql_fetch_array(3), mysql_fetch_assoc(3), mysql_fetch_object(3), mysql_data_seek(3), mysql_fetch_lengths(3), mysql_result(3).
PHP Documentation Group MYSQL_FETCH_ROW(3)