How to add a fixed directory into an if statement?
<p>I am trying to make a simple script that would move junk files into a bin like directory.</p>

<p>The code i wrote is here:</p>

<pre><code>echo "Which file/s you want to delete?"

read fileName

if [ -d  "/home/user/.waste"]
then
    #moves the file to .waste
    mv $fileName /home/user/.waste
    echo "File deleted."

else
    #creates the directory
    mkdir /home/user/.waste
    mv $fileName /home/user/.waste
    echo "waste bin created and file deleted."
fi
</code></pre>

<p>When i run the script while having the directory it keeps going to the else option and does not recognize the value i entered in the if statement.</p>