home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 9.9 Don't Match Useless Files in Filename Completion Chapter 9
Saving Time on the Command Line
Next: 9.11 Repeating a Command with a foreach Loop
 

9.10 Filename Completion Isn't Always the Answer

There are a number of times when filename completion ( 9.8 , 11.13 ) isn't appropriate:

  • If you want to list many files on the command line, it may be easier to use a carefully constructed wildcard ( 1.16 ) expression.

  • As we mentioned earlier, filename completion and wildcards don't mix. If you need to use a wildcard, you can't use filename completion. For example, you might want to match a filename by the end of its name; if you have lots of files starting with a but only one of those filenames ends with .c , it's probably easier to type *.c or a*.c than to use filename completion.

  • Filename completion is obviously less worthwhile if you have to type most of the filename before you can use it. For example, if you have a lot of files with similar names, filename completion won't help an awful lot. (This may say something about the way you name files - the remedy might be to think up some more distinctive names.)

- ML , JP


Previous: 9.9 Don't Match Useless Files in Filename Completion UNIX Power Tools Next: 9.11 Repeating a Command with a foreach Loop
9.9 Don't Match Useless Files in Filename Completion Book Index 9.11 Repeating a Command with a foreach Loop

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System