[Tcsh] glob-pattern that matches everything except a particular set of files

Christos Zoulas christos at zoulas.com
Sat Feb 8 17:04:03 UTC 2020


Sorry, there is no way to do this currently.

christos

> On Jan 3, 2020, at 5:41 PM, Eduardo Alvarez <ealvarez at fastmail.com> wrote:
> 
> Hello, list,
> 
> (At least) in bash, one can delete all files in a directory except for a particular file or set of files by using extended pattern matching operators, like so:
> 
>    shopt -s extglob
>    rm !("exclude_me")
> 
> I tried doing the same thing with tcsh, but I'm unsure how. My first instinct was to use glob-patterns, like so:
> 
>    rm ^{sample1,sample2}
> 
> But as the man page states, this is not negated correctly. How would one go about achieving this task?
> 
> Regards,
> 
> --
>  Eduardo Alvarez
>  ealvarez at fastmail.com
> --
> Tcsh mailing list
> Tcsh at astron.com
> https://mailman.astron.com/mailman/listinfo/tcsh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20200208/48e690ed/attachment.asc>


More information about the Tcsh mailing list