public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Zsh and wildcards
@ 2019-02-19 22:00 Mike Brown
  2019-02-20  8:08 ` Brian Inglis
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Brown @ 2019-02-19 22:00 UTC (permalink / raw)
  To: cygwin mail list

Zsh 5.3 under Win7-64

I'm trying to do the following:

    mv TSMUXER/*.ac3 TSMUXER/txmuxer.ac3

The problem is the the * is not being expanded.  I have no idea why not.

Any tips will be appreciated.

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
        6082066843@email.uscc.net (140 char limit)       \ / Ribbon Campaign
Visit - URL: http://vidiot.com/                           X  Against
             http://vidiot.net/                          / \ HTML Email
"What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett
"How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby
 - Castle - 11/25/13

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Zsh and wildcards
  2019-02-19 22:00 Zsh and wildcards Mike Brown
@ 2019-02-20  8:08 ` Brian Inglis
       [not found]   ` <20190220181351.GP2904@mrvideo.vidiot.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Inglis @ 2019-02-20  8:08 UTC (permalink / raw)
  To: cygwin

On 2019-02-19 13:42, Mike Brown wrote:
> Zsh 5.3 under Win7-64
> I'm trying to do the following:
>     mv TSMUXER/*.ac3 TSMUXER/txmuxer.ac3
> The problem is the the * is not being expanded.  I have no idea why not.
> Any tips will be appreciated.

The command line implies you have a .ac3 file already in TSMUXER and want to
rename it to fixed name txmuxer.ac3. A lack of expansion implies there is no
file matching that pattern. You can prefix simple commands with echo to test
their effect. If a pattern is not expanded, use ls to check what exists in the
source directory, and where it differs from your expectation.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Zsh and wildcards
       [not found]   ` <20190220181351.GP2904@mrvideo.vidiot.com>
@ 2019-02-20 21:41     ` Brian Inglis
  2019-02-20 22:25       ` Eliot Moss
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Inglis @ 2019-02-20 21:41 UTC (permalink / raw)
  To: cygwin

On 2019-02-20 11:13, Mike Brown wrote:
> On Tue, Feb 19, 2019 at 11:31:24PM -0700, Brian Inglis wrote:
>> On 2019-02-19 13:42, Mike Brown wrote:
>>> Zsh 5.3 under Win7-64
>>> I'm trying to do the following:
>>>     mv TSMUXER/*.ac3 TSMUXER/txmuxer.ac3
>>> The problem is the the * is not being expanded.  I have no idea why not.
>>> Any tips will be appreciated.
>>
>> The command line implies you have a .ac3 file already in TSMUXER and want to
>> rename it to fixed name txmuxer.ac3. A lack of expansion implies there is no
>> file matching that pattern. You can prefix simple commands with echo to test
>> their effect. If a pattern is not expanded, use ls to check what exists in the
>> source directory, and where it differs from your expectation.
> 
> Ah, but the file I want to change the name of is indeed there.  For this
> particular run, the name is ".track_2.ac3".
> 
> And yes, I did all kinds of testing to see what was being presented.
> 
> For the time being I got around it by doing:
> 
>     mv TSMUXER/`ls -A TSMUXER` TSMUXER/tsmuxer.ac3
> 
> But, I'd rather use the wildcard.  Plus, I'd like to know why it isn't
> working and how to fix it.

Dotfiles .* are hidden by default under most shell expansions unless .* is
explicitly specified or shell specific options are specified: for zsh specify
the D glob qualifier *(D), for bash set shopt -s dotglob.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Zsh and wildcards
  2019-02-20 21:41     ` Brian Inglis
@ 2019-02-20 22:25       ` Eliot Moss
  0 siblings, 0 replies; 4+ messages in thread
From: Eliot Moss @ 2019-02-20 22:25 UTC (permalink / raw)
  To: cygwin

On 2/20/2019 4:39 PM, Brian Inglis wrote:
> On 2019-02-20 11:13, Mike Brown wrote:
>> On Tue, Feb 19, 2019 at 11:31:24PM -0700, Brian Inglis wrote:
>>> On 2019-02-19 13:42, Mike Brown wrote:
>>>> Zsh 5.3 under Win7-64
>>>> I'm trying to do the following:
>>>>      mv TSMUXER/*.ac3 TSMUXER/txmuxer.ac3
>>>> The problem is the the * is not being expanded.  I have no idea why not.
>>>> Any tips will be appreciated.
>>>
>>> The command line implies you have a .ac3 file already in TSMUXER and want to
>>> rename it to fixed name txmuxer.ac3. A lack of expansion implies there is no
>>> file matching that pattern. You can prefix simple commands with echo to test
>>> their effect. If a pattern is not expanded, use ls to check what exists in the
>>> source directory, and where it differs from your expectation.
>>
>> Ah, but the file I want to change the name of is indeed there.  For this
>> particular run, the name is ".track_2.ac3".
>>
>> And yes, I did all kinds of testing to see what was being presented.
>>
>> For the time being I got around it by doing:
>>
>>      mv TSMUXER/`ls -A TSMUXER` TSMUXER/tsmuxer.ac3
>>
>> But, I'd rather use the wildcard.  Plus, I'd like to know why it isn't
>> working and how to fix it.
> 
> Dotfiles .* are hidden by default under most shell expansions unless .* is
> explicitly specified or shell specific options are specified: for zsh specify
> the D glob qualifier *(D), for bash set shopt -s dotglob.

... or just do: mv TSMUXER/.*.ac3 TSMUXER/tsmuxer.ac3

(Note the . after the / !)

Best - EM

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2019-02-20 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 22:00 Zsh and wildcards Mike Brown
2019-02-20  8:08 ` Brian Inglis
     [not found]   ` <20190220181351.GP2904@mrvideo.vidiot.com>
2019-02-20 21:41     ` Brian Inglis
2019-02-20 22:25       ` Eliot Moss

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 read-only IMAP folder(s) and NNTP newsgroup(s).