Problem with bash scripting

Posted by eple on Server Fault See other posts from Server Fault or by eple
Published on 2011-02-06T12:41:28Z Indexed on 2011/02/06 15:27 UTC
Read the original article Hit count: 319

Filed under:

Hi.

I terrible with bash scripting, and need some help with the following:

#!/bin/bash

if [ -e Pretty* ];then
ncftpput -R -DD -v -u xbmc -p xbmc 192.168.1.100 /home/xbmc/TV/Pretty_Little_Liars/ Pretty*
else
echo "No new folders"
fi

find -depth -type d -empty -exec rmdir {} \;

Problem here is the ncftpput line.. if I just do a simple [ echo "working" ] instead, everything is OK, but when I try the ncftpput-line it just gives me [ line 5: [: too many arguments ]

the ncftpput command alone works fine..

Any ideas?

© Server Fault or respective owner

Related posts about bash