made the pack completely portable and wrote relevent bat files to go with it
This commit is contained in:
15
gitportable/usr/share/awk/readfile.awk
Normal file
15
gitportable/usr/share/awk/readfile.awk
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user