Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does AWK extract numbers

Shulou Source: shulou.com Published: 2022-05-31 14:28:02 10月04日 Update

This article mainly explains "how to extract numbers from AWK". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to extract numbers from AWK.

/ / Test text score.txt

Aaron Physics 87

Abel Maths 98

Rahul Chinese 90

Buck Biology 87

Byron English 85

Dave History 89

Enoch Chemistry 89

/ / take out data with scores greater than or equal to 90 points.

[root@vagrant-centos65 awk] # awk'$3 > = 90 {print $0} 'score.txt

Abel Maths 98

Rahul Chinese 90

/ / take out the score > = 90 and

Tags: Numbers content grades data learning files times same warm three scores available in commands characters that is ideas situations file names text articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB MySQL Microsoft macOS Xiaomi