October 2006
Intermediate to advanced
888 pages
16h 55m
English
A broad area of everyday scripting is to work with files and directories, including entire subtrees of files. Much of the relevant material has already been covered in Chapter 4, “Internationalization in Ruby,” but we will hit a few high points here.
Because I/O is a fairly system-dependent thing, many tricks will vary from one operating system to another. If you are in doubt, you should resort to experimentation.
Many tools that we use every day (both vendor-supplied and home-grown) are simply text filters; that is, they accept textual input, process or transform it in some way, and output it again. Classic examples of text filters in the UNIX world are sed ...
Read now
Unlock full access