• Important: We recently upgraded our forum software - please let us know if you run into any issues.

Search results

  1. L

    Copying Directories with Exceptions - possible?

    Interesting that the bash 5.0 manual explicitly mentions the !(pattern) that we have been having difficulty with. Even Bash, Version 2.05a mentions it. It must be a compilation issue with regard to POSIX compliance. I think I may do some research to make my Gentoo bash non-POSIX compliant, to...
  2. L

    Copying Directories with Exceptions - possible?

    My bash version is 4.4.12 under Gentoo which pretty much up to date, except, at this time, a minor blocking issue with mariadb and openssl.
  3. L

    Copying Directories with Exceptions - possible?

    I am ok knowing that I am running an old version of bash and that this is a new feature which I don't have. It is cool knowing that filename expressions are can be full regexps, I look forward to checking the manpage for the new version of bash. Being able to exclude files from a glob expression...
  4. L

    Copying Directories with Exceptions - possible?

    I understand it's a regular expression, but the problem is, ! is a reserved Bash word (negation), brackets (list) enclose a list which is executed in a subshell, both of these come directly from the Bash man page. What you are describing is globbing, or filename expansion, which is a subset of...
  5. L

    Copying Directories with Exceptions - possible?

    Would you mind explaining !(/home/BS|/home/fubar)? Are you using a specific shell? I use Bash 4.412 on my Gentoo system and I tried the cp command you supplied and receive an event not found error. Having been a bash user for 20 odd years, this confuses me somewhat and am keen to understand the...
  6. L

    Copying Directories with Exceptions - possible?

    Use tar to create an archive to stdout, of the source tree, excluding the unwanted directories and pipe the result back through tar to extract the wanted stuff in the target directory. Note the relative directory specs. cd / ; tar cf - ./home --exclude=./home/BS --exclude=./home/fubar | (cd...
Top