嘿伙计们,我正在尝试将所有文件从一个目录移动到另一个不包含在黑名单中的文件,我收到的错误missing destination file after operand after $SVN
还包括一些调试器信息,谢谢。
#!/bin/bash
clear; set -x
# here
ROOT=`pwd`
# dirs
SVN_FOLDER="${ROOT}/svn"
GIT_FOLDER="${ROOT}/git"
# blacklist
EXCLUDE=('.git' '.idea')
EXCLUDELIST=$(printf "|%s" "${EXCLUDE[@]}")
EXCLUDEDIR=`echo "${GIT_FOLDER}/!(${EXCLUDELIST:1})"`
shopt -s dotglob nullglob # see hidden
mv $EXCLUDEDIR $SVN_FOLDER
# + mv {dir}/svn <--- the excluded stuff is NOT in the MV cmd?
# mv: missing destination file operand after ‘{dir}/svn’