Re: LS in a script file

2017-04-06 Thread Tom H
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 list -- users@lists.fedo

Re: LS in a script file

2017-04-04 Thread Cameron Simpson
VERTHING 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 P

Re: LS in a script file

2017-04-04 Thread Gordon Messmer
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

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
"Community support for Fedora users" > 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 the file end in .bib, except the file ending by -e.bib

Re: LS in a script file

2017-04-04 Thread Rick Stevens
and not EVERTHING 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,

Re: LS in a script file

2017-04-04 Thread Rick Stevens
uot;*.bib" and NOT named "*-e.bib"' Make sense? >> Sent: Tuesday, April 04, 2017 at 10:57 PM >> From: JD >> To: users@lists.fedoraproject.org >> Subject: Re: LS in a script file >> >> >> >> On 04/04/2017 02:34 PM, Patrick Dupre

Re: LS in a script file

2017-04-04 Thread Joe Zeff
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. ___

Re: LS in a script file

2017-04-04 Thread Dave Stevens
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 > > find . !(*@(-e)).bib > > N

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
> 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 comm

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
; From: JD > 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 the file ending

Re: LS in a script file

2017-04-04 Thread Gordon Messmer
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

Re: LS in a script file

2017-04-04 Thread Ed Greshko
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

Re: LS in a script file

2017-04-04 Thread JD
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 `(' ls -d !\(*@\(-

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
140 Dunkerque, France > > =============== > > > > > >> Sent: Tuesday, April 04, 2017 at 8:25 PM > >> From: JD > >> To: users@lists.fedoraproject.org > >> Subject: Re: LS in a script file >

Re: LS in a script file

2017-04-04 Thread JD
0)3 28 23 76 12 | | Fax: 03 28 65 82 44 189A, avenue Maurice Schumann | | 59140 Dunkerque, France === Sent: Tuesday, April 04, 2017 at 8:25 PM From: JD To: users@lists.fedoraproject.org Subject: Re:

Re: LS in a script file

2017-04-04 Thread JD
189A, avenue Maurice Schumann | | 59140 Dunkerque, France === Sent: Tuesday, April 04, 2017 at 8:25 PM From: JD To: users@lists.fedoraproject.org Subject: Re: LS in a script file On 04/04/2017 12:13 P

Re: LS in a script file

2017-04-04 Thread Terry Polzin
y, April 04, 2017 at 8:25 PM > > From: JD > > To: users@lists.fedoraproject.org > > Subject: Re: LS in a script file > > > > > > > > On 04/04/2017 12:13 PM, Terry Polzin wrote: > > > > > > > > > 2017-04-04 14:05 GMT-04:00

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
59140 Dunkerque, France === > Sent: Tuesday, April 04, 2017 at 8:25 PM > From: JD > To: users@lists.fedoraproject.org > Subject: Re: LS in a script file > > > > On 04/04/2017 12:13 PM, Terry Polzin

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
Community support for Fedora users" > Subject: Re: LS in a script file > > > > > > On Tuesday, April 4, 2017 3:02 PM, Patrick Dupre wrote: > > > > > > === > Patric

Re: LS in a script file

2017-04-04 Thread Terry Polzin
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`. > > -- Pete > > On Apr 4, 2017 1:05 PM, "Patrick Dupre" wrote: > >> Hello, >> >> How can I put this command in a script file? >> FILES=`ls -d !(*@(-e)).bib` >> >

Re: LS in a script file

2017-04-04 Thread Antonio Olivares
3 28 23 76 12 | | Fax: 03 28 65 82 44 189A, avenue Maurice Schumann | | 59140 Dunkerque, France === Sent: Tuesday, April 04, 2017 at 8:45 PM From: "Antonio Olivares" To: "Community support for Fedora use

Re: LS in a script file

2017-04-04 Thread Patrick Dupre
e Schumann | | 59140 Dunkerque, France ===     Sent: Tuesday, April 04, 2017 at 8:45 PM From: "Antonio Olivares" To: "Community support for Fedora users" Subject: Re: LS in a script file     On Tuesday,

Re: LS in a script file

2017-04-04 Thread Pete Travis
Do not parse ls. Make a find invocation, ie `find /path/ -not -name $pattern`. -- Pete On Apr 4, 2017 1:05 PM, "Patrick Dupre" wrote: > Hello, > > How can I put this command in a script file? > FILES=`ls -d !(*@(-e)).bib` > > I get an error because of the ( > >

Re: LS in a script file

2017-04-04 Thread Antonio Olivares
On Tuesday, April 4, 2017 1:05 PM, Patrick Dupre 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 DUPRÉ                         

Re: LS in a script file

2017-04-04 Thread JD
On 04/04/2017 12:13 PM, Terry Polzin wrote: 2017-04-04 14:05 GMT-04:00 Patrick Dupre >: 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" them FILES=`ls -d

Re: LS in a script file

2017-04-04 Thread Terry Polzin
2017-04-04 14:05 GMT-04:00 Patrick Dupre : > 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" them > FILES=`ls -d !\(*@\(-e\)\).bib` ___ users mailing

LS in a script file

2017-04-04 Thread Patrick Dupre
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 l