sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011)
- From: Remko van der Vossen <wich AT yuugen.jp>
- To: Ismael Luceno <ismael.luceno AT gmail.com>
- Cc: Vlad Glagolev <stealth AT tiberian.ru>, sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011)
- Date: Sun, 15 May 2016 15:00:07 +0200
On Sun, May 15, 2016 at 12:00:14AM -0300, Ismael Luceno wrote:
> On 14/May/2016 21:36, Vlad Glagolev wrote:
> > How about rewriting it in something else than awk?
> >
> > Let's say what Sorcery uses, i.e. bash?
>
> I would love to see an implementation in pure BASH, I'm inclined
> towards AWK just because it was designed for pattern matching, and
> I couldn't think of any elegant way to solve the problem in pure BASH.
Pure bash is never going to work as bash cannot have nul bytes contained
in variables.
I made a version [0] that uses od(1) to get the file header in hex.
I think it's a reasonable solution that;
1) is fast
2) only depends on coreutils
3) is not sensitive to awk syntax idiosyncrasies
Regards, Remko
[0] https://bugs.sourcemage.org/attachment.cgi?id=7585
-
[SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Pavel Vinogradov, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Pavel Vinogradov, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
- Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011), Pavel Vinogradov, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Pavel Vinogradov, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Vlad Glagolev, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Remko van der Vossen, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Jaka Kranjc, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/15/2016
- Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011), Jaka Kranjc, 05/15/2016
- Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011), Ismael Luceno, 05/15/2016
- Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011), Jaka Kranjc, 05/18/2016
- Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011), Vlad Glagolev, 05/18/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Jaka Kranjc, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Remko van der Vossen, 05/15/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Pavel Vinogradov, 05/14/2016
-
Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011),
Ismael Luceno, 05/15/2016
- Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011), Jaka Kranjc, 05/15/2016
Archive powered by MHonArc 2.6.24.