Mwnci cat() Function

Syntax

cat(filename)

Description

The cat() function returns the contents of file filename as a single string.

Example

filename="/etc/passwd"
lines=split(cat(filename), "\n")   //split the single string by newline
foreach line in lines {
    println(line)
}

...
...
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
...
...


// A simpler version
print(cat("/etc/passwd"))