1

I have no idea what is wrong with my simple script.

view story
linux-howto

http://www.unix.com – I am doing a simple "recycle bin" script. It is to check and see if the directory .TRASH exists within the home directory. If not then it makes the directory then appends a date and time to file and then finally moves the file in. However, when I run this script, it is not making the directory as it should. What am I missing? Code: #!/bin/bash if [ -d "~/.TRASH" ] then         mkdir ~/.TRASH fi DATE=$(date +'_%Y%m%d_%H%M') mv $PWD/"$1" "~/.TRASH/${1}.${DT}" (HowTos)