Originally Posted by eparl
if -i rm .o .y; in it113student; echo successful else echo failed fi
trying to get this to work ?
What is the "-i" before the "rm" for??? If it's rm's intercative option, it must go after "rm" becasue it's and argument to rm. What you're saying now is to run the command named "-i" with the arguments "rm", ".o", and ".y".
What does the "in is113student" for? It's totally invalid syntax, and even if it was, there is no "in" command. If you meant the run this in the directory "it113student", you should run "cd it113student" before all this. Remember, prgramming languages are not like humen languages, computers can't "figure out" what you mean. It has to comply to an exact specification or the computer will get none of it.
If I correctly understood you wanted to do, I think this is what your script should look like:
if rm -i .o .y