O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The substr (str, start, [ length ]) function

The substr (str,start, [ length ])  function is used to extract a portion of a string. It returns the substring from the str string, starting from the character number's start, and its length is the number of characters to extract. If the length is not given as an argument to the function, then the remaining string from the starting position to the end of the string is extracted. If the starting position is less than 1, then it is treated as if it were one. If the starting position is greater than the number of characters in the string, it returns the null string. If the length is present but less than or equal to zero, it returns the null string. The first character of the string is character ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required