[cod] [CoD] custom mod moving script
Luca Fabbro
luca.fabbro at procne.it
Fri Jan 2 10:43:18 EST 2004
At 17.51 31/12/2003, you wrote:
>hey everyone.....i have built some custom scripts that start, shutdown,
>and restart the mohaa server that i posted here that u could also edit to
>be used on CoD. some of u may have looked at it. Neways.......I am gonna
>try and make a mod moving script. So.....this script needs to read a
>directories contents......check to see if a certain file name is
>there. If it is then move it to a folder called "disabledMODS" or
>something like that. Then do just the opposite to put it back. Then i'll
>have it restart the server when it's done. I know how to do the mv
>command. But i don't know how to make it check for a file in a
>directory. Can anyone help me out? Thanks.
>
>Nathan - A.K.A. [BASHYOU] SNiPeS
Don't know if this is what you're asking for.
A piece of BASH script could be this
# Checks for an existing file named filename
if [ -f filename ]
then
# Here move it
else
# If there is no file don't know what you want to do
fi
Hope that this helps
Luca
More information about the Cod
mailing list