Created
July 20, 2023 21:23
-
-
Save ingmarioalberto/46284ab01df4adc9bd5909324a88bacb to your computer and use it in GitHub Desktop.
acordeón awk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk | |
Separator:--> -F ":" | |
columnas 1,3,última:--> '{print $1" "$3" "$NF}' | |
awk | |
Separator:--> -F ":" | |
sum column 3:--> '{s=s+$3}END{print s}' | |
awk | |
regex en var GG:--> GG="[0-9]+" | |
if col2 like regex:--> '{if ( $2 ~ GG ){ print $0; }}' | |
awk | |
if col2=LINUX print all '$2 == "LINUX" { print $0 }' | |
awk | |
print col4 w/out lastchar '{print substr($4,1,length($4)-1)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment