int main( int argc, char *argv[] ) { /* uses getopts to check for "b:t:" optstring then * comes here. */ for ( int i = 0; i < argc; i++ ) { fp = fopen( argv[i], "r" ); if ( fp == NULL ) err( 1, "File does not exist or could not be opened " "for reading -- %s", optarg ); } /* When no optionss given it calls readall */ } static void readall( FILE *fp, int lncnt ) { while ( (lncnt = fgetc( fp )) != EOF ) { printf( "%c", lncnt ); } } _________________ Here is my setup Terry@Dixie$ echo $PATH 8:56 /usr/home/Terry/sh:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin Terry@Dixie$ which rf 8:56 /usr/home/Terry/sh/rf Terry@Dixie$ ls | grep *.c 8:56 Style_Guide.c Style_Guide.c_bak Terry@Dixie$ rf Style_Guide.c 8:56 rf: File does not exist or could not be opened for reading -- (null): No such file or directory If I run it through my debugger and set args to Style_Guide.c it reads the file out as normal. If I use ether $ ~/sh/rf Style_Guide.c it works just fine. ~/sh holds personal shell scripts and binaries.