Sponsored Content
Full Discussion: Script to sort data
Top Forums Shell Programming and Scripting Script to sort data Post 302146396 by wizardy_maximus on Tuesday 20th of November 2007 09:55:42 AM
Old 11-20-2007
MySQL Script to sort data

Hi All,

I have a .csv file with 3 columns called nLats, nLongs, and fRes. in following format :

"nLats","nLongs","fRes"
0,0,-1
0,1,-1
0,2,-1
0,3,-1
0,4,-1
.........
.........
0,143,-1 nLats increments at nLongs=143
1,0, -1
1,1, -1
..........
..........
1,143,-1
2,0,-1
2,1,-1
.........
.........
2,143,-1

Goes till nLats = 71.
I wish to sort fRes value in nLats*nLons Array, ie an array of 72*144.

(nLats 1st) -1 -1 -1 -1 -1......................-1
.............................................
.............................................
.............................................
(nLats 72nd)-1 -1 -1 -1 -1.....................-1
the max value of nLats=71 starting from 0, ie 72 rows
the max value of nLongs=143 starting from 0, ie 144 columns.

How shall I proceed???

Thanks all,
wiz_max
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sort data

Hi! I'm trying to sort a file.dat with the sort command. The data contained by file.dat is similar to the data set below: 100.000 99.000 110.000 55.000 113.000 33.000 25.000 9.000 15.000 It is relatively easy to sort the data in ascending or descending order, but the problem is... (11 Replies)
Discussion started by: bjorb
11 Replies

2. Shell Programming and Scripting

Sort complex data

Hi, Can someone here help sorting the following data in numeric order? INPUT: FIRST abc(3) def(13) fgh(1) ijk(6) abc(2) SECOND dfe(10) abc(4) hij(19) tlm(1) hij(1) hub(10) abc(1) fed(3) OTHERS hij(10) mok(4) bub(19) hij(1) abc(2) abc(15) abc(1) hij(3) OUTPUT: FIRST def(13) ijk(6)... (12 Replies)
Discussion started by: need_help
12 Replies

3. Shell Programming and Scripting

Trying to sort data

Im trying to sort all this data. I need to get a list out of the data (websites) and just list them out can anyone point me in the right direction. Im working with dans guardian. 2009.6.10 6:26:50 - 192.168.42.200... (5 Replies)
Discussion started by: darknirvana
5 Replies

4. Shell Programming and Scripting

script to sort a string of numerical data in set fields

So, I will be working with someone and basically we are trying to build a form that is submitted most likely via the web and the data is just a string of numbers. like: 19383882872201110929282821818182827349190102837364718191001932873711 Now, each number is part of a numerical value of... (4 Replies)
Discussion started by: tlarkin
4 Replies

5. Shell Programming and Scripting

Perl script to sort data on second numeric field

Hi, I'm a learner of PERL programming. I've a input file with the below data: SWAT_5, 1703, 2010-09-21 SWAT_6, 2345, 2010-09-21 SWAT_7, 1792, 2010-09-21 SWAT_8, 1662, 2010-09-21 SWAT_9, 1888, 2010-09-21 VXHARP_1, 171, 2010-09-21 I need to sort this data based on the second... (6 Replies)
Discussion started by: ganapati
6 Replies

6. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

7. Shell Programming and Scripting

Sort Data by Group !

Hello, I have a file and i want to sort by third column and extract the three top lines of each group, it is determined by the second column (144, 89, 55, etc). Could you please help me with the appropiate awk shell script XLY-XLP 144 0.592772 XLY-XLE 144 0.798121 ... (3 Replies)
Discussion started by: csierra
3 Replies

8. Homework & Coursework Questions

Shell script calling Perl function, sort and find data, write to new files

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I must write a shell script that calls two external Perl functions--one of which sorts the data in a file, and... (6 Replies)
Discussion started by: kowit010
6 Replies

9. UNIX for Dummies Questions & Answers

sort data

Hi, I need to filter the output of a command and display certain data only. How can i do this ? My file contain: $ cat abc.txt <testcase title="AAA_100"> <testcase title="BBB_200"> <testcase title="CCC_300"> <testcase title="DDD"> ... (3 Replies)
Discussion started by: crazydude80
3 Replies

10. Shell Programming and Scripting

Need to sort out data

Hello All, I have one file with multiple lines records like as below.. I need to extract only BFG and corresponding BSG record/line. for evry BFG there is one BSG record is there as mentioned in BOLD and so on... BFG BR 00001 20140724 000 000 ? ? BLG UVR QPR 01 380 ? ? 999 0 0 0 ? BLC... (2 Replies)
Discussion started by: Riverstone
2 Replies
ISLOWER(3)						   BSD Library Functions Manual 						ISLOWER(3)

NAME
islower -- lower-case character test LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <ctype.h> int islower(int c); int islower_l(int c, locale_t loc); DESCRIPTION
The islower() function tests for any lower-case letters. The value of the argument must be representable as an unsigned char or the value of EOF. In the ASCII character set, this includes the following characters (with their numeric values shown in octal): 141 ``a'' 142 ``b'' 143 ``c'' 144 ``d'' 145 ``e'' 146 ``f'' 147 ``g'' 150 ``h'' 151 ``i'' 152 ``j'' 153 ``k'' 154 ``l'' 155 ``m'' 156 ``n'' 157 ``o'' 160 ``p'' 161 ``q'' 162 ``r'' 163 ``s'' 164 ``t'' 165 ``u'' 166 ``v'' 167 ``w'' 170 ``x'' 171 ``y'' 172 ``z'' The islower_l() function takes an explicit locale argument, whereas the islower() function uses the current global or per-thread locale. RETURN VALUES
The islower() and islower_l() functions return zero if the character tests false and return non-zero if the character tests true. COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases. The iswlower() function should be used instead. SEE ALSO
ctype(3), iswlower(3), tolower(3), ascii(7) STANDARDS
The islower() function conforms to ISO/IEC 9899:1990 (``ISO C90''). The islower_l() function conforms to IEEE Std 1003.1-2008 (``POSIX.1''). BSD
July 30, 2012 BSD
All times are GMT -4. The time now is 09:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy