Originally Posted by putrye
how can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.
You write a script by opening an editor, and typing.
If you mean you don't know what to put in it, you should begin by looking up scripting tutorials and/or your textbooks, since this sounds VERY much like a blatant homework assignment. There are thousands of bash scripting tutorials out there that can help you...did you try to look at any of them?