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: 12/03/2024