longline man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

readfile(1F)			 FMLI Commands			  readfile(1F)

NAME
       readfile, longline - reads file, gets longest line

SYNOPSIS
       readfile filename

       longline [filename]

DESCRIPTION
       The readfile function reads filename and copies it to stdout. No trans‐
       lation of NEWLINE is done. It keeps track of the longest line it	 reads
       and if there is a subsequent call to longline, the length of that line,
       including the NEWLINE character,	 is returned.

       The longline function returns the length, including the NEWLINE charac‐
       ter,  of the longest line in filename. If filename is not specified, it
       uses the file named in the last call to readfile.

EXAMPLES
       Example 1 Typical use of readfile and longline

       Here is a typical use of readfile and longline in a text frame  defini‐
       tion file:

	    .
	    .
	    .
	 text="`readfile myfile`"
	 columns=`longline`
	    .
	    .
	    .

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │SUNWcs			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       cat(1), attributes(5)

DIAGNOSTICS
       If  filename  does not exist, readfile will return  FALSE (that is, the
       expression will have an error return).

       longline returns	 0 if a readfile has not previously been issued.

NOTES
       More than one descriptor can call readfile in the same frame definition
       file.  In  text	frames,	 if  one  of those calls is made from the text
       descriptor, then a subsequent use of longline will always get the long‐
       est  line  of  the  file	 read by the readfile associated with the text
       descriptor, even if it was not the most recent use of readfile.

SunOS 5.11			  5 Jul 1990			  readfile(1F)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net