使用AWK过滤数据

现有大批量的文本数据,需要截取其中符合一定范围的数据(减少数据量)。数据的格式如下:

42.69,-84.6,1
41.74,-86.21,1
42.26,-83.73,2
43.01,-83.68,6
42.74,-84.48,3
42.29,-83.7,4
42.29,-83.25,2
41.36,-82.07,1
42.99,-83.73,3
42.24,-84.41,1

其中,截取的目标范围是第一列的数字在一定范围,如40-44,第二列在另个范围。
开始我是将其全部导入到数据库中(copy命令),然后再进行delete操作,但随数据的处理,数据库的速度越来越慢,导致数据的处理速度不可接受。因此想在入库前就先行截取。Google后发现了解决方案:Using AWK to Filter Rows
具体解决方案如下:
awk -F',' '{ if($1 <= 44.0 && $1>=41.0 && $2<=-82.0 && $2>=-87.0) {print }}' 20161026-2300-point.csv


已发布

分类

来自

标签:

评论

《 “使用AWK过滤数据” 》 有 13 条评论

  1. sans ordonnance kamagra en ligne afin

    acheter kamagra sans ordonnance

  2. buying enclomiphene online from canada

    get enclomiphene cheap pharmacy

  3. buying androxal purchase prescription

    androxal australia no prescription

  4. buying dutasteride in mexico

    buy dutasteride cheap uk

  5. ordering flexeril cyclobenzaprine uk online pharmacy

    purchase flexeril cyclobenzaprine generic from canadian pharmacy

  6. gabapentin no doctor prescription

    how to buy gabapentin canada low cost

  7. purchase fildena cheap mastercard

    cheap fildena generic compare

  8. ordering itraconazole purchase uk

    buy itraconazole cheap online in the uk

  9. discount avodart uk sales

    generic avodart prices

  10. buying staxyn price usa

    order staxyn united kingdom

  11. cheapest buy xifaxan generic europe

    xifaxan online canadian pharmacy

  12. online order rifaximin us overnight delivery

    how can i order rifaximin without a perscrption

  13. kamagra irsko online

    jak nakupovat kamagra online

回复 order androxal uk pharmacy 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注