Hi. My friend has a problem that smbtar cannot recognize space character in specified filenames. He tried to execute following command line to back file "long file name" up: $ smbtar -s SERVER -p PASSWORD -x SHARE -u username -t /tmp/backup.tar \ "long file name" but smbtar tried to include three files as 'long', 'file' and 'name'. :-( Here is the patch for this problem: *** smbtar.dist Fri Mar 5 21:35:26 1999 --- smbtar Tue Jun 1 15:46:07 1999 *************** *** 161,164 **** eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ -E -N $log -D "'$cdcmd'" ${clientargs} \ ! -T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose --- 161,164 ---- eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ -E -N $log -D "'$cdcmd'" ${clientargs} \ ! -T${tarcmd}${tarargs} $blocksize $newer $tapefile '"$@"' $verbose The "$@" is a feature of /bin/sh. (see sh(1)) But, is the "$@" a generic feature of /bin/sh? I don't know... -- >8 -- signature -- >8 -- FROM : SATOH Fumiyasu <fumiya@cij.co.jp> WEB : http://www.bento.ad.jp/~fumiya/ WEB(LAN): http://kumasun.si.ykhm.cij.co.jp/ SAMBA : http://samba.bento.ad.jp/
On Jun 9, 1999, SATOH Fumiyasu <fumiya@cij.co.jp> wrote:> The "$@" is a feature of /bin/sh. (see sh(1)) > But, is the "$@" a generic feature of /bin/sh? I don't know...Yup. But, in order to be portable, you should use ${1+"$@"}, because some shells expand "$@" to "" if no arguments are given, while others simply remove "$@" in this case. I'm fixing this for the next release, thanks -- Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il {oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org} oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org} *** E-mail about software projects will be forwarded to mailing lists