Tag Archives: awk function

awk custom function and examples

Here, you need to use the awk custom function to implement the abs function.

awk ‘function abs(x){return (x < 0) ? -x : x;} {print abs($0)}' Continue reading

Posted in Awk Command, Text Processing | Tagged , , , | 1 Comment