start page | rating of books | rating of authors | reviews | copyrights

UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 44.20 test: Testing Files and Strings Chapter 44
Shell Programming for the Uninitiated
Next: 44.22 Finding a Program Name; Multiple Program Names
 

44.21 Picking a Name for a New Command

When you write a new program or shell script, you'll probably want to be sure that its name doesn't conflict with any other commands on the system. For instance, you might wonder whether there's a command named tscan . You can check by typing one of the commands in the following example. If you get output (besides an error) from one of them, there's probably already a command with the same name. (The type command works on ksh , bash and many Bourne shells; I've shown it with a currency sign ( $ ) prompt.)

 
 
which
   
whereis
   
alias
    
 







% 

man 1 tscan

 No manual entry for tscan in section 1. % 

which tscan

 no tscan in . /xxx/ehuser/bin /usr/bin/X11 /usr/local/bin ... % 

whereis tscan

 tscan: % 

alias tscan

 %  $ 

type tscan

 tscan not found

- JP


Previous: 44.20 test: Testing Files and Strings UNIX Power Tools Next: 44.22 Finding a Program Name; Multiple Program Names
44.20 test: Testing Files and Strings Book Index 44.22 Finding a Program Name; Multiple Program Names

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