Guangning Yu's Blog
Home
Code
Data
Setup
Industry
MachineLearning
Archive
Awk Basics
2019-02-17 01:40:29
- Get absolute value ``` awk '{printf("%d",sqrt($1*$1))}' test.csv ``` - User defined function ``` echo "4 105" | awk 'function max(a,b){return a>b?a:b}{print max($1, $2)}' ```
Previous:
Collaborative Filtering
Next: No Post