Linux Journal: Shell Functions and Path Variables, Part 3Apr 28, 2000, 20:25 (0 Talkback[s])
(Other stories by Steve Collyer)
WEBINAR: On-demand Event
Replace Oracle with the NoSQL Engagement Database: Why and how leading companies are making the switch REGISTER >
"In this final article in the series, I'll describe the remaining path handling functions and point out a few implementation issues. Before I do that, however, I will describe a utility called makepath. This reads either standard input or its argument list, builds a colon-separated path variable (pathvar) from those lines read and echoes it to standard output. For example:
"First, let's look at listpath, which echoes the pathels making up a pathvar on separate lines, as in:
"Using listpath has two advantages over merely echoing $MANPATH. First, it's much easier to read the pathels when they appear on separate lines; and secondly, you can pipe its output through grep..."
"UNIX can present a bewildering array of tools and techniques, and it's almost impossible for any individual to be intimately familiar with all of them. In my experience, the best developers carry around a large bag of simple but useful techniques and are able to combine them rapidly into a working solution. You don't need to know every detail of every tool to do useful work, but you do need a bag of tricks you understand."
0 Talkback[s] (click to add your comment)