Yep, thanks for the confirmation.
My next point (should awk close its files only after close of relevant braces) was get everyone following this thread, to be wary their data and the resulting number simultaneously open files that might be required.

As you say, "simple enough" (but if you don't think it through, embarrassing results could be hidden in your (large dataset) results.
:-)

Cheers for now,
Zoltan

On 2014/07/15 09:08, Matt Boyd wrote:
Hi Zoltan,
good point. I did a little reading and there were some notes about awk / linux having issues if there were too many files open at one time so my assumption is that all files are open until the script finishes. My file was sorted and it appears to have worked, but as I go through the data I'll keep this in mind. I'll run it with >> to see if there is a difference tomorrow.

regards
Matt



On Tue, Jul 15, 2014 at 4:47 PM, Zoltan Szecsei <[email protected] <mailto:[email protected]>> wrote:

    Hi,
    Can't test this now, and am a very novice awk user, but if column
    3 was _not_ sorted, would only the last contiguous set of records
    be in the output file(s)?
    In other words, when does awk close the output file, and would
    '>>' be safer than '>' ?

    Regards,
    Zoltan



    On 2014/07/15 08:29, Matt Boyd wrote:
    I possibly shouldn't have bothered the list but as I did, this is
    the script I used.

    awk -F, '{print > $3}' Filtered_data.csv

    prints the whole line and creates a new file named & based on
    column 3.

    Simple enough to be embarrassing





--
    ===========================================
    Zoltan Szecsei PrGISc [PGP0031]
    Geograph (Pty) Ltd.
    GIS and Photogrammetric Services

    P.O. Box 7, Muizenberg 7950, South Africa.

    Mobile:+27-83-6004028  <tel:%2B27-83-6004028>
    Fax:+27-86-6115323  <tel:%2B27-86-6115323>      www.geograph.co.za  
<http://www.geograph.co.za>
    ===========================================


    _______________________________________________
    Qgis-user mailing list
    [email protected] <mailto:[email protected]>
    http://lists.osgeo.org/mailman/listinfo/qgis-user




--

===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services

P.O. Box 7, Muizenberg 7950, South Africa.

Mobile: +27-83-6004028
Fax:    +27-86-6115323     www.geograph.co.za
===========================================

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to