分页: 1 / 1

请教zsh的两个命令

发表于 : 2010-07-19 18:32
skylyj
# Replace spaces (any number of them) with a single dash in file names
$ autload zmv
$ zmv -n '(**/)(* *)' '$1${2//( #-## #| ##)/-}'
这个表达式是什么意思( #-## #| ##)
# Add *.py to a bunch of python scripts in a directory (some of them end
# in *.py and give them all a proper extension
$ autoload zmv
$ zmv -n '(**/)(con*)(#qe,file $REPLY | grep "python script",)' '$1$2.py'
其中的con*和#q是什么意思