I have a shell script which is failing. I am on Unix right now. I need your help in this matter. My code is all about looking for files on a directory which is having a specific prefix. Usually all of the files have the prefix of "s" such as sMusic, sDocument, etc. My code is as follows:
and my script is as follows:if [file exists with prefix s*] then
perform operation1
else
perform operation2
fi
if [-e s*]; then
operation1
else
operation2
fi
But the problem is that although you will find a lot of folders/files containing prefix of "s", the above code still fails and directly goes to the ELSE part. Need your help urgently!
Bookmarks