Hi All,
I would like to have a script which is able to perform the below.
Print the whole row if column1 which is "0001" for the below example is the first occurrence. Subsequent "0001" occurrence will not be printed out and so on.
Can any expert help ?
Input:
0001 k= 40
0001 k= 2... (7 Replies)
Dear friends,
Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number.
Program
COUNT=1
for MYDIR in `ls /`
do
VOBS=${MYDIR}
echo "${COUNT}. ${MYDIR}"
... (4 Replies)
Hello,
I have an input file like the following:
11_3_4
2_1_35
3_15__
_16989
Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Hi,
I want to print column value based on row number say multiple of 8.
Input file:
line 1 67 34
line 2 45 57
. . .
. . .
line 8 12 46
. . .
. . .
line 16 24 90
. . .
. . .
line 24 49 67
Output
46
90
67 (2 Replies)
Hi Experts,
In short : Need to split file when field in column 5 is blank and need to generate two file in which column 5 is blank and other in which column 5 has values along with other rows and column data
My issue is i am not able to get header for column from raw file into new file which... (1 Reply)
Hi all,
I have searched and searched, but I have not found a solution that quite fits what I am trying to do.
I have a long list of data in three columns. Below is a sample:
1,10,8
2,12,10
3,13,12
4,14,14
5,15,16
6,16,18
Please use code tags
What I need to do is as follows: If a... (4 Replies)
Hello,
I have this table:
chr1_16857_17742 - chr1 17369 17436 "ENST00000619216.1"; "MIR6859-1"; - 67
chr1_16857_17742 - chr1 14404 29570 "ENST00000488147.1"; "WASH7P"; - 885
chr1_16857_18061 - chr1 ... (5 Replies)
Discussion started by: coppuca
5 Replies
LEARN ABOUT PHP
rsort
RSORT(3) 1 RSORT(3)rsort - Sort an array in reverse orderSYNOPSIS
bool rsort (array &$array, [int $sort_flags = SORT_REGULAR])
DESCRIPTION
This function sorts an array in reverse order (highest to lowest).
PARAMETERS
o $array
- The input array.
o $sort_flags
- You may modify the behavior of the sort using the optional parameter $sort_flags, for details see sort(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
rsort(3) example
<?php
$fruits = array("lemon", "orange", "banana", "apple");
rsort($fruits);
foreach ($fruits as $key => $val) {
echo "$key = $val
";
}
?>
The above example will output:
0 = orange
1 = lemon
2 = banana
3 = apple
The fruits have been sorted in reverse alphabetical order.
NOTES
Note
This function assigns new keys to the elements in $array. It will remove any existing keys that may have been assigned, rather than
just reordering the keys.
SEE ALSO arsort(3), krsort(3), The comparison of array sorting functions.
PHP Documentation Group RSORT(3)