04-14-2008
6,
0
Join Date: Apr 2008
Last Activity: 24 April 2008, 1:31 PM EDT
Posts: 6
Thanks Given: 0
Thanked 0 Times in 0 Posts
test -s help
i'm supposed to come up with a script that
-accepts a directory as an optional command line parameter
-clears the screen
-displays an error message and terminates if more than one parameter is provided
-use the current directory if no parameter is provided
-display an error message and terminates if the provided parameter is not a directory
-for the directory to be processes, displays a single line of information about each regular file within it: file name, file size, file owner (in that order). For any file that is zero bytes in length, the script is to offer to delete the file, accepting only y/n responses and then proceeding accordingly.
-contains appropriate documentation and error checking
the bolded text is where i'm having trouble. i know i'm supposed to be using
if test -s $1 or something like that i'm just not sure what to do next.