strange `printf` arguments, parsing features (bugs?)

2008-05-14 Thread Oleg Verych
# (1) parameters to `printf`? [EMAIL PROTECTED]:/tmp$ sh -c 'printf -1' printf: 1: Illegal option -1 # (2) parsing features? [EMAIL PROTECTED]:/tmp$ sh -c 'echo 1; } echo 2' 1 2 [EMAIL PROTECTED]:/tmp$ sh -c '} echo 2' sh: Syntax error: } unexpected [EMAIL PROTECTED]:/tmp$ sh -c 'echo 2; }' 2

Re: Inconsistent parameter expansion

2008-05-18 Thread Oleg Verych
I can't figure out why '*/FILE' and '*/FILE' are not expanded the same way... This and one from [EXPAND] Fix slash treatment in expmeta work with Etch: [EMAIL PROTECTED] dash -c 'echo /root*' /root [EMAIL PROTECTED] dash -c 'echo */FILE' A/FILE B/FILE C/FILE D/FILE [EMAIL PROTECTED] This

that multi-threading (Re: funny `dash` build, `sed` + BRE (Re: shell and glibc))

2008-05-19 Thread Oleg Verych
Forgot one thing. == Let strange quark decay == $time sed -n '/:Version: /s`.*/\(.*\):Version: \([^:]*:\)*`\1_`p' sed.input here2 real0m0.284s user0m0.268s sys 0m0.020s $diff -u here here2 | head $ So, nearly one order of magnitude? $time sed -n '/:Version:

cmd modifiers options: CPU affinity, ASLR, lightweight exec...

2008-05-19 Thread Oleg Verych
Subject: command modifiers (Re: Changes with provided user's source code transform (Size and performance efficient rewriting of the `dash.test` built-in)) Date: Thu, 1 May 2008 02:00:41 +0100 `expr, $1 * $2` -- don't expand shell patterns; or just `expr:, $1 * $2 `; options may be

Re: cmd modifiers options: CPU affinity, ASLR, lightweight exec...

2008-05-19 Thread Oleg Verych
After today's exercises i'd like to add: `sed,c` -- set CPU affinity; maybe some free CPU choice is needed also: `sed,c[0]` stick to CPU 0 `sed,c[1]` to CPU 1, another form `sed,cpu[1]` Use cases: * my buddy, doing his batch calculations; of course, i can say to him, hey there's a

Re: Dash problem with IFS

2009-05-11 Thread Oleg Verych
On 5/11/09, Sven Mascheck: On Thu, May 07, 2009 at 07:01:56PM +0300, Oleg Verych wrote: # just newline IFS=`printf '\n+'`; IFS=${IFS%+} last example is POSIXly correct ugliness. Bashizm looks better (: IFS=$'\n' PS: I see the problem distinguishing a tab from a space

about coding style (Re: exit-ing in a trap handler uses the wrong exit code)

2010-09-25 Thread Oleg Verych
Hi. 2010/9/26, Loïc Minier l...@dooz.org: On Sat, Sep 25, 2010, Jilles Tjoelker wrote: You are certainly right that POSIX requires this to be handled differently, but there are various other shells that are non-compliant in the same way as dash and it is easy to avoid the behaviour, so I