On Tue, Apr 4, 2017 at 3:43 PM, Pete Travis wrote:
>
> Do not parse ls. Make a find invocation, ie `find /path/ -not -name
> $pattern`.
Please don't top post.
"find" also.
http://mywiki.wooledge.org/ParsingLs
___
users mailing
at 10:57 PM
From: JD <jd1...@gmail.com>
To: users@lists.fedoraproject.org
Subject: Re: LS in a script file
On 04/04/2017 02:34 PM, Patrick Dupre wrote:
find . !(*@(-e)).bib
and
ls -d !(*@(-e)).bib
work fine in a command line, but never
in a script
command substitu
On 04/04/2017 03:17 PM, Patrick Dupre wrote:
I would imagine that you're using "#!/bin/sh" as the first line in the
script, and bash is working in POSIX mode. Try using "#!/bin/bash" as
the first line in the script.
No, it does not help
Ah. You have to set the extglob option, as documented
i...@alldigital.com>
> To: "Community support for Fedora users" <users@lists.fedoraproject.org>
> Subject: Re: LS in a script file
>
> On 04/04/2017 02:35 PM, Patrick Dupre wrote:
> > Hello,
> >
> > Sorry for the lack for clarity.
> > I want to list all t
ERTHING below it, use:
find . -maxdepth 1 -name "*.bib" -not -name "*-e.bib"
to restrict the search to the current directory. Or use Joe's
suggestion (which may be cleaner for you):
ls -d *.bib | grep -v -e.bib
>>> Sent: Tuesday, April 04, 2017 at 10:57 PM
.bib"
and NOT named "*-e.bib"'
Make sense?
>> Sent: Tuesday, April 04, 2017 at 10:57 PM
>> From: JD <jd1...@gmail.com>
>> To: users@lists.fedoraproject.org
>> Subject: Re: LS in a script file
>>
>>
>>
>> On 04/04/2017 0
On 04/04/2017 02:35 PM, Patrick Dupre wrote:
Sorry for the lack for clarity.
I want to list all the file end in .bib, except the file ending by -e.bib
This can be done by (from the shell command)
ls -d !(*@(-e)).bib
or by
find . !(*@(-e)).bib
ls -d *.bib | grep -v -e.bib
HTH, HAND.
On Tue, 4 Apr 2017 15:10:44 -0700
Gordon Messmer wrote:
> On 04/04/2017 02:35 PM, Patrick Dupre wrote:
> > I want to list all the file end in .bib, except the file ending by
> > -e.bib This can be done by (from the shell command)
> > ls -d !(*@(-e)).bib
> > or by
> >
> On 04/04/2017 02:35 PM, Patrick Dupre wrote:
> > I want to list all the file end in .bib, except the file ending by -e.bib
> > This can be done by (from the shell command)
> > ls -d !(*@(-e)).bib
> > or by
> > find . !(*@(-e)).bib
>
> Note that "find" doesn't support that syntax. The find
D <jd1...@gmail.com>
> To: users@lists.fedoraproject.org
> Subject: Re: LS in a script file
>
>
>
> On 04/04/2017 03:35 PM, Patrick Dupre wrote:
> > Hello,
> >
> > Sorry for the lack for clarity.
> > I want to list all the file end in .bib, except t
On 04/04/2017 02:35 PM, Patrick Dupre wrote:
I want to list all the file end in .bib, except the file ending by -e.bib
This can be done by (from the shell command)
ls -d !(*@(-e)).bib
or by
find . !(*@(-e)).bib
Note that "find" doesn't support that syntax. The find command only
works because
On 04/05/17 05:56, JD wrote:
> locate .bib | grep -v '\-e.bib'
"locate" is probably inappropriate if the files in question are created
dynamically since locate depends on a database which is usually only
updated once per day.
--
Fedora Users List - The place to go to get others to do the work
jd1...@gmail.com>
To: users@lists.fedoraproject.org
Subject: Re: LS in a script file
On 04/04/2017 02:34 PM, Patrick Dupre wrote:
find . !(*@(-e)).bib
and
ls -d !(*@(-e)).bib
work fine in a command line, but never
in a script
command substitution: line 9: syntax error near unexpected token `('
t.org
> Subject: Re: LS in a script file
>
>
>
> On 04/04/2017 02:34 PM, Patrick Dupre wrote:
> > find . !(*@(-e)).bib
> > and
> > ls -d !(*@(-e)).bib
> >
> >
> >
> > work fine in a command line, but never
> > in a script
> >
ubject: Re: LS in a script file
On 04/04/2017 12:13 PM, Terry Polzin wrote:
2017-04-04 14:05 GMT-04:00 Patrick Dupre <pdu...@gmx.com
<mailto:pdu...@gmx.com>>:
Hello,
How can I put this command in a script file?
FILES=`ls -d !(*@(-e)).bib`
I get an error because
Maurice Schumann | | 59140 Dunkerque, France
===
Sent: Tuesday, April 04, 2017 at 8:25 PM
From: JD <jd1...@gmail.com>
To: users@lists.fedoraproject.org
Subject: Re: LS in a script file
On 04/04/2017
Sent: Tuesday, April 04, 2017 at 8:25 PM
> > From: JD <jd1...@gmail.com>
> > To: users@lists.fedoraproject.org
> > Subject: Re: LS in a script file
> >
> >
> >
> > On 04/04/2017 12:13 PM, Terry Polzin wrote:
> > >
> > >
> > > 2017
, France
===
> Sent: Tuesday, April 04, 2017 at 8:25 PM
> From: JD <jd1...@gmail.com>
> To: users@lists.fedoraproject.org
> Subject: Re: LS in a script file
>
>
>
> On 04/04/2017 12:13 PM, Terry
t; To: "Community support for Fedora users" <users@lists.fedoraproject.org>
> Subject: Re: LS in a script file
>
>
>
>
>
> On Tuesday, April 4, 2017 3:02 PM, Patrick Dupre <pdu...@gmx.com> wrote:
>
>
>
>
>
>
llo,
>>
>> How can I put this command in a script file?
>> FILES=`ls -d !(*@(-e)).bib`
>>
>> I get an error because of the (
>>
>>
> Good point.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
To: "Community support for Fedora users" <users@lists.fedoraproject.org>
Subject: Re: LS in a script file
On Tuesday, April 4, 2017 1:05 PM, Patrick Dupre <pdu...@gmx.com> wrote:
Hello,
How can I put this command in a script file?
FILES=`l
| | 59140 Dunkerque, France
===
Sent: Tuesday, April 04, 2017 at 8:45 PM
From: "Antonio Olivares" <olivares14...@yahoo.com>
To: "Community support for Fedora users" <users@lists.fedoraproject.org>
Do not parse ls. Make a find invocation, ie `find /path/ -not -name
$pattern`.
-- Pete
On Apr 4, 2017 1:05 PM, "Patrick Dupre" <pdu...@gmx.com> wrote:
> Hello,
>
> How can I put this command in a script file?
> FILES=`ls -d !(*@(-e)).bib
On Tuesday, April 4, 2017 1:05 PM, Patrick Dupre <pdu...@gmx.com> wrote:
Hello,
How can I put this command in a script file?
FILES=`ls -d !(*@(-e)).bib`
I get an error because of the (
===
Patrick
On 04/04/2017 12:13 PM, Terry Polzin wrote:
2017-04-04 14:05 GMT-04:00 Patrick Dupre <pdu...@gmx.com
<mailto:pdu...@gmx.com>>:
Hello,
How can I put this command in a script file?
FILES=`ls -d !(*@(-e)).bib`
I get an error because of the (
Have you trie
2017-04-04 14:05 GMT-04:00 Patrick Dupre <pdu...@gmx.com>:
> Hello,
>
> How can I put this command in a script file?
> FILES=`ls -d !(*@(-e)).bib`
>
> I get an error because of the (
> Have you tried to "escape" t
Hello,
How can I put this command in a script file?
FILES=`ls -d !(*@(-e)).bib`
I get an error because of the (
===
Patrick DUPRÉ | | email: pdu...@gmx.com
Laboratoire de Physico-Chimie de
27 matches
Mail list logo