Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: avoid errors on expansion failure



On 13 June 2014 15:13, Eric Smith <Eric.Smith@xxxxxxxxxx> wrote:
> Thank you ...
>
>> > How do I make the command ignore this and to run first time?
>>
>> don't know if this helps your case
>> >
>> /tmp > touch fred.jpg
>
> Nope, you are just updating the timestamp on the file, thereby
> over-riding the time specification.

You probably misunderstood the whole point then, touch creates a file
only for the purpose of demonstrating the commands that follow.
However, I would recommend using the (foo|bar|baz) syntax rather than
{foo,bar,baz} as it is a single glob expression that doesn't need any
additional (N) flags to not fail and no caveat when none of the
patterns match.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author