Skip to Content
Shell Scripting Recipes: A Problem-Solution Approach, Second Edition
book

Shell Scripting Recipes: A Problem-Solution Approach, Second Edition

by Chris F. A. Johnson, Jayant Varma
October 2015
Intermediate to advanced content levelIntermediate to advanced
380 pages
7h 5m
English
Apress
Content preview from Shell Scripting Recipes: A Problem-Solution Approach, Second Edition

CHAPTER 6

image

Loose Names Sink Scripts: Bringing Sanity to Filenames

The Naming of Files is a serious matter,

This isn’t just one of your Usenet flames;

You may think at first it doesn’t much matter

But I tell you, a file should have a SENSIBLE NAME.

(with apologies to T. S. Eliot)

What is a sensible name, and what can be done about pathological filenames? In this chapter, we describe alternatives for creating acceptable filenames and provide scripts for dealing with bad names. We also provide shell replacement functions for the basename and dirname commands.

What’s in a Name?

A Unix filename may contain any character except NUL and the forward ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Distributed Computing in Java 9

Distributed Computing in Java 9

Raja Malleswara Rao Malleswara Rao Pattamsetti
Wicked Cool Shell Scripts, 2nd Edition

Wicked Cool Shell Scripts, 2nd Edition

Dave Taylor, Brandon Perry
Backup and Restore Practices for Sun Enterprise™ Servers

Backup and Restore Practices for Sun Enterprise™ Servers

Stan Stringfellow, Michael Barto, Miroslav Klivansky

Publisher Resources

ISBN: 9781484202203Purchase book