rtrim ( var );
There are actually three forms: trim, ltrim, and rtrim. The rtrim built-in function returns the value of var with trailing spaces removed.
Example
{ $0 = rtrim( $0 ); } #
Trim trailing blanks from all input lines
Last modified date: 07/26/2024