sysrc(8) -- a sysctl(8)-like utility for managing rc.conf(5)
cyrille.lefevre-lists at laposte.net
Sun Nov 7 01:06:27 UTC 2010
Le 06/11/2010 19:14, Devin Teske a écrit :
> On Nov 6, 2010, at 7:37 AM, Cyrille Lefevre wrote:
>> Le 06/11/2010 04:16, Devin Teske a écrit :
> So, there should be no concern about expanding escape-sequences unless
> all of the following is true:
> a. You're using sh, bash, or something similar (not csh or tcsh)
well, pdksh :-) freebsd builtin echo doesn't expand \ sequences, sorry.
>> this imply performance
>> degradation... alternatively, you may want to use the -E option to echo
>> if supported (freebsd seems to support it, so, use it).
>> same remark about read, always use the -r option...
> I think you meant `-e', I'm not familiar with `-E', is that the opposite
> of `-e' (as in, "don't expand escape-sequences")?
well, -E is suppported by pdksh and bash but not by ksh88 nor ksh93.
so, consider it as a bashisime. also, I've the habit to alias echo to
echo -E under bash to get the bsd behaviour... so, don't care, but
rememer you that echo may have bad effects in portable programs.
> Use of `-r' depends. I find that it's not enough to say "always use it".
> 50% of the cases I've come across should not use it while the other half
> should. It really depends on whether you want to pick up the contents of
> the next line should there be a trailing back-slash at the end of the
> first line read.
usual users don't even known the -r option to read and are wrong about
that. it's just a remember you :-)
forgot my geek code :-)
-----BEGIN GEEK CODE BLOCK-----
GAT/CS/E/IT/MU/TW@ d-()>++ s:+>: a+@$ C++(+++)>++++ UABCHILOS*++++(+++)$
P-(+)>-- L->+++$ E++(---)@ W++>- N+(+++)@ o? K w !O M- V- PS(+) PE-(--)>
Y+ PGP-> t+ 5? X+ R* tv++ b- DI-->+++ D+ G(-) e-(+++) h----(++)> y+++(?)
------END GEEK CODE BLOCK------
mailto:Cyrille.Lefevre-lists at laposte.net
More information about the freebsd-rc