next | previous | forward | backward | up | top | index | toc | home

get -- get the contents of a file

Description

get "f" -- yields a string containing the contents of the file whose name is f.

get "!f" -- yields a string containing the output from the shell command "f".

get "$hostname:service" -- yields a string containing the input from the socket obtained by connecting to the specified host at the port appropriate for the specified service. Warning: if the process providing the service expects interaction, it will not get it, and this command will hang. This feature is not available on Sun computers, because Sun doesn't provide static versions of crucial libraries dealing with network communications.

get f -- yields a string containing the rest of the input from the file f, closing the file.

i1 : "junk" << "hi there" << close

o1 = junk

o1 : File
i2 : get "junk"

o2 = hi there
i3 : removeFile "junk"
i4 : get "!date"

o4 = Fri Jul 14 23:48:22 CDT 2006

See also

Ways to use get :