|
From: | Peggy Russell |
Subject: | Re: How to create bash-pattern to exclude a matching param in param expansion&matching? |
Date: | Wed, 30 Oct 2013 14:56:48 -0500 |
User-agent: | KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
> > You missed one set of quotes: > > > > for f in "${1:-.}"/*; do > > That still won't handle whitespace in file names. Probably better to > use find instead. > > Andreas. find is cool. ls has an -I, --ignore=PATTERN ls -l -I"*-IGN-*" Greg added the quotes. Thanks. I tested with: mkdir "dir with spaces" touch "dir with spaces"/simple-{a..c} "dir with spaces"/test-abc-IGN-def "dir with spaces/spa ces" ./scriptname "dir with spaces" Worked as expected. Peggy Russell
[Prev in Thread] | Current Thread | [Next in Thread] |