- Subject: command modifiers (Re: Changes with provided user's source code transform (Size and performance efficient rewriting of the `dash.test` built-in))
- From: "Oleg Verych" <olecom@xxxxxxxxx>
- Date: Thu, 1 May 2008 02:00:41 +0100
> == original proposition for -nt -ot (specifying lists of files to check) ==
To list of my failed shell inventions[0], i'd like to add following.
[0] ftp://flower.upol.cz/dts/ash0000_var/ideas
`test` or `[` commands show, that static shell parsing rules are not flexible.
Someone invented `[[`, somebody will invent similar (mis-)behaviour, if `sh`
will be more popular. Statement: command modifiers.
> `test: $1 = $2` -- don't do IFS spliting on $VARS (just like `[[`)
> `expr, "$1" * "$2"` -- don't expand shell patterns; or just
> `expr:, $1 * $2 `; options may be included e.g.
>> `test,n "$file" -nt arch/avr32/*` -- don't leave unexpanded patterns
>> `test:,b $file -nt [^a].*` -- pattern is BRE, (ERE, etc, what libc provides)
(examples are using -nt proposition, but `make` with file-name patterns can
there as well) etc. (still collecting input)
>`/bin/chroot! .`-- don't copy environment
So, shell will be more flexible without compatibility issues. Wired
commands with similar endings must be quoted in double quotes or placed
in vars (another way of quotation).
> `$CMD:: $2` -- just invented -- do double parsing of CMD like `eval`. Problem
with `eval` is, that it doesn't handle infinite (user input) loops in
provided string.
String is generated script.
(see final page of ftp://flower.upol.cz/upload/colorize-linux-build.sh )
etc. Use your imagination and be creative. `perl` didn't provide shell
after all.
--
sed 'sed && sh + olecom = love' << ''
-o--=O`C
#oo'L O
<___=E M
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[LARTC]
[Bugtraq]
[Yosemite Forum]
[Photo]