Why extglob except breaking except condition?

前端 未结 1 1553
梦谈多话
梦谈多话 2021-01-14 17:31

I run in Debian 8.1, GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) and Lenovo G50-30 with 500 GB SSD and 8 GB flash memory:

shopt -s extglob
cp -         


        
相关标签:
1条回答
  • 2021-01-14 18:04

    Try removing the backslash (I am adding echo for test purposes):

    shopt -s extglob
    echo cp -r !(Backups.backupdb) /home/masi/Documents/
    

    It works in my environment (GNU bash, version 4.3.30, OS X)

    0 讨论(0)
提交回复
热议问题