Is there an option, for cat, head, tail, or is there any way, to display a file from last line to first? For example, my file
looks like this:
aaaa
bbbb
cccc
eeee
and I would like to print or display it like this:
eeee
cccc
bbbb
aaaa
thanks (5 Replies)
I need a command which filters rows ONLY NOT beginning with '*'
So far I have following NOT sufficient command, because it does not include ALL possible literals except of '*'
grep ^ INPUT_FILE >>OUTPUT_FILE
Is it possible to write something like
grep NOT ^
INPUT_FILE... (3 Replies)
Hi
i had String like
UID: ABC345QWE678GFK345SA90, LENGTH 32
when I used awk ' FS, {print $1}' prints
ABC345QWE678GFK345SA90,
how can i getrid of that coma at the end of the string.
Thanks in advance.. (14 Replies)
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)
What is a regex for "the dalai lama, his holiness the"
that would just grab "the dalai lama"
and one that would just grab "his holiness the"? Both should exclude the comma..
I was trying '^.*' and many variants with no luck. (6 Replies)
how to Remove comma as last charector in end of last line of file:
example:
input file
---------------
aaaaaa,
bbbbbb,
cccc,
12345,
____________
output file :
-----------
aaaaaa,
bbbbbb, (6 Replies)
It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this:
For example,
apple
-orange
tree
pipe-
banana-shake
dupe-
What my output should look like:
apple
orange
tree... (1 Reply)
Hi,
How can we remove the comma from the end of each line.
I have a csv file in below format.
file.csv
Name,age,gender,location,
Joel,18,M,Newyork,
Monoj,21,M,Japan,
Litu,23,M,turki,
Expected o/p
file1.csv
Name,age,gender,location (4 Replies)
Hi,
I now that >> will append text to the end of the text that is already inside the file.
How to append the new text infront of the text that is already in the file.
Thanks for any input.
Regards,
Chandu (3 Replies)
Discussion started by: chandrakanth
3 Replies
LEARN ABOUT PHP
dbx_fetch_row
DBX_FETCH_ROW(3) 1 DBX_FETCH_ROW(3)dbx_fetch_row - Fetches rows from a query-result that had the DBX_RESULT_UNBUFFEREDflag setSYNOPSIS
mixed dbx_fetch_row (object $result_identifier)
DESCRIPTION dbx_fetch_row(3) fetches rows from a result identifier that had the DBX_RESULT_UNBUFFERED flag set.
When the DBX_RESULT_UNBUFFERED is not set in the query, dbx_fetch_row(3) will fail as all rows have already been fetched into the results
data property.
As a side effect, the rows property of the query-result object is incremented for each successful call to dbx_fetch_row(3).
PARAMETERS
o $result_identifier
- A result set returned by dbx_query(3).
RETURN VALUES
Returns an object on success that contains the same information as any row would have in the dbx_query(3) result data property, including
columns accessible by index or fieldname when the flags for dbx_query(3) were set that way.
Upon failure, returns 0 (e.g. when no more rows are available).
EXAMPLES
Example #1
How to handle the returned value
<?php
$result = dbx_query($link, 'SELECT id, parentid, description FROM table', DBX_RESULT_UNBUFFERED);
echo "<table>
";
while ($row = dbx_fetch_row($result)) {
echo "<tr>
";
foreach ($row as $field) {
echo "<td>$field</td>";
}
echo "</tr>
";
}
echo "</table>
";
?>
SEE ALSO dbx_query(3).
PHP Documentation Group DBX_FETCH_ROW(3)