zsh-users
 help / color / mirror / code / Atom feed
* matching all files which do not have a dot in filename
@ 2004-08-24 19:47 Julius Plenz
  2004-08-24 21:07 ` Vincent Lefevre
  2004-08-24 22:07 ` DervishD
  0 siblings, 2 replies; 5+ messages in thread
From: Julius Plenz @ 2004-08-24 19:47 UTC (permalink / raw)
  To: zsh-users

Hi,

I have some problems when I try to match all files which include no
dot in their filename...

I just want zsh to do this:  Move all files which have no extension to
<former filename>.html.

First I thought of this: **/*~*.* - but that doesn't work since it
includes sub-directories which I dont want to get matched. So I tried
**/*(.)~*.* to just match files - but zsh says that doesn't work.

Anny suggestions?  TIA!

Julius
-- 
e/www/plenz,0% zsh --version
zsh 4.2.0 (i686-pc-linux-gnu)

http://plenz.com/tmp/setup/zshrc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: matching all files which do not have a dot in filename
  2004-08-24 19:47 matching all files which do not have a dot in filename Julius Plenz
@ 2004-08-24 21:07 ` Vincent Lefevre
  2004-08-24 22:17   ` Bart Schaefer
  2004-08-24 22:07 ` DervishD
  1 sibling, 1 reply; 5+ messages in thread
From: Vincent Lefevre @ 2004-08-24 21:07 UTC (permalink / raw)
  To: zsh-users

On 2004-08-24 19:47:00 +0000, Julius Plenz wrote:
> I have some problems when I try to match all files which include no
> dot in their filename...

With EXTENDED_GLOB set: [^.]#

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: matching all files which do not have a dot in filename
  2004-08-24 19:47 matching all files which do not have a dot in filename Julius Plenz
  2004-08-24 21:07 ` Vincent Lefevre
@ 2004-08-24 22:07 ` DervishD
  1 sibling, 0 replies; 5+ messages in thread
From: DervishD @ 2004-08-24 22:07 UTC (permalink / raw)
  To: Julius Plenz; +Cc: zsh-users

    Hi Julius :)

 * Julius Plenz <usenet@plenz.com> dixit:
> First I thought of this: **/*~*.* - but that doesn't work since it
> includes sub-directories which I dont want to get matched. So I tried
> **/*(.)~*.* to just match files - but zsh says that doesn't work.

    Try (if you want recursion at all) **/*~*.*(.) The glob modifier
affects the entire glob expression, so the above means 'match all
files no matter its name except if they have a dot in their name'.

    Hope that helps :) (here does).

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: matching all files which do not have a dot in filename
  2004-08-24 21:07 ` Vincent Lefevre
@ 2004-08-24 22:17   ` Bart Schaefer
  2004-08-26  9:01     ` DervishD
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2004-08-24 22:17 UTC (permalink / raw)
  To: zsh-users

On Tue, 24 Aug 2004, Julius Plenz wrote:

> First I thought of this: **/*~*.* - but that doesn't work since it
> includes sub-directories which I dont want to get matched. So I tried
> **/*(.)~*.* to just match files - but zsh says that doesn't work.

Did you try **/*~*.*(.) ?  I think you have the glob qualifier in the 
wrong place.  However, that will omit all files underneath directories 
with dots in the directory name, which may not be what you meant.

On Tue, 24 Aug 2004, Vincent Lefevre wrote:

> With EXTENDED_GLOB set: [^.]#

Or **/[^.]#(.) for all such plain files in the tree.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: matching all files which do not have a dot in filename
  2004-08-24 22:17   ` Bart Schaefer
@ 2004-08-26  9:01     ` DervishD
  0 siblings, 0 replies; 5+ messages in thread
From: DervishD @ 2004-08-26  9:01 UTC (permalink / raw)
  To: zsh-users

    Hi Bart :)

 * Bart Schaefer <schaefer@brasslantern.com> dixit:
> > First I thought of this: **/*~*.* - but that doesn't work since it
> > includes sub-directories which I dont want to get matched. So I tried
> > **/*(.)~*.* to just match files - but zsh says that doesn't work.
> Did you try **/*~*.*(.) ?  I think you have the glob qualifier in the 
> wrong place.  However, that will omit all files underneath directories 
> with dots in the directory name, which may not be what you meant.

    And, how about **/(*~*.*)(.)? I've tested here with subdirs
having dots in their names and _seems_ to work...
 
> > With EXTENDED_GLOB set: [^.]#
> Or **/[^.]#(.) for all such plain files in the tree.

    Shorter and simpler ;)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-26  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24 19:47 matching all files which do not have a dot in filename Julius Plenz
2004-08-24 21:07 ` Vincent Lefevre
2004-08-24 22:17   ` Bart Schaefer
2004-08-26  9:01     ` DervishD
2004-08-24 22:07 ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).