Files
php-sdk-binary-tools/msys2/usr/share/awk/readfile.awk
Anatol Belski 95b786e714 add awk
2016-09-28 02:38:30 +02:00

16 lines
267 B
Awk

# readfile.awk --- read an entire file at once
#
# Original idea by Denis Shirokov, cosmogen@gmail.com, April 2013
#
function readfile(file, tmp, save_rs)
{
save_rs = RS
RS = "^$"
getline tmp < file
close(file)
RS = save_rs
return tmp
}