Chapter 3. String Briefs
When I was introduced to Bourne shell scripting, I took to it immediately, despite some obvious deficiencies in the language. One of the features missing was string manipulation. It existed, but almost everything had to be done with external commands that were loaded from the disk each time. The KornShell introduced a number of parameter expansion modifiers that drastically reduced the number of calls to external commands. These were copied by other shells and incorporated into the POSIX standard.
To take full advantage of the POSIX features, all these scripts are presented as functions that are comprised in two libraries, char-funcs
and string-funcs
Sourcing these files in your .profile
makes them available at the command ...
Get Shell Scripting Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.