Use the name of the command to choose whether you are finding or deleting a
file. Name your program assn8 and create two soft links to it. Name the
first link findit and the second delit. When you run your program, you can
test the name by which you invoked it to determine which function to perform.
Once you have determined whether you are finding or deleting, test for the -i
option on the command line. If options does not exist, search/delete all files
matching name given. If -i option exists, you are to find or delete filenames
by matching inode rather than name.
Assumptions:
else if 1st argument on command line is -n
else if 1st argument begins with a - (e.g -a, -e, -p, -bob, etc)
end of case
if number of arguments on cmd line is less than one
endif
while there are arguments in cmdline argument list
get inode of file
use find to list all files of the same inode as the specified filename,
use your $cwd as the starting point
else (search by filename)
else if this program run as delit
get inode of file
use find to list all files of the same inode, use your $cwd as the
starting point
for each file found by find
else (search by name)
else
endif
end of while