reading files

Reading Multiple Files with Bash

Linux Today  Sat, 08/22/2009 - 14:04

Linux Journal: "Reading files is no big deal with bash: you just redirect the input to the script or pipe the output of another command into the script, or you could do it inside the script if the file names are pre-determined.

You could also use process substitution to pass in the open files (command pipelines actually) from the command line."


 

Reading Multiple Files with Bash

Linux Journal - The Original Magazine of the Linux Community  Fri, 08/21/2009 - 13:22

Reading files is no big deal with bash: you just redirect the input to the script or pipe the output of another command into the script, or you could do it inside the script if the file names are pre-determined.

You could also use process substitution to pass in the open files (command pipelines actually) from the command line.

Another option, the one I describe here, is to just open the files and read (or write) them as you like, as you'd do in other programming languages.


 

PHPro.org: Read Line From File (stream_get_line)

PHPDeveloper.org  Thu, 04/23/2009 - 08:36

The PHPro.org website has a quick new tutorial about a method (using streams) to get the information from a certain line of a file.