readahead ( num );
This built-in function permits text spanning multiple lines to be read as a single input line. It can be called at any time in the script and will automatically return the input file position to where it was before readahead was called. This is most useful when the end-of-line string must be determined from contents of the input file. The ReadAhead function returns a string containing the number of characters specified in the "num" parameter.
Example
# Find EOL=?
varStr = readahead(90)
BEGIN {split(varStr, half, "EOL="); ILS = substr(half[1],1,1); }
Last modified date: 12/03/2024