[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: REVIEW REQUEST - user manual generation
From: |
Gavin Smith |
Subject: |
Re: Fwd: REVIEW REQUEST - user manual generation |
Date: |
Sat, 4 Jun 2016 23:29:27 +0100 |
On 4 June 2016 at 22:40, Vincent Belaïche <address@hidden> wrote:
> These two things also work:
>
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> in_input_funnies=`echo "$in_input" \
> | $SED -e 's![^}#$%&^_{~]!!g; s!\(.\)!\1\'"
> "'!g' \
> | uniq`
> --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8----
>
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> in_input_funnies=`echo "$in_input" \
> | $SED -e 's![^}#$%&^_{~]!!g; s!\(.\)!\1\''
> ''!g' \
> | uniq`
> --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8----
>
> but I prefer the one with "$newline" to keep the sed command on the same
> line.
Nice idea to hide it in a variable.
I'd come up with
in_input_funnies=`echo "$in_input" \
| $SED -e 's![^}#$%&^_{~]!!g; s!\(.\)!\1'\\\\'
''!g' \
| uniq`
which is fairly similar to the two examples above you gave, except
it's less clear. (Four backslashes because backslash escaped once for
the shell, and once for the ``-expression.)
- Re: Fwd: REVIEW REQUEST - user manual generation, (continued)
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/03
- Re: Fwd: REVIEW REQUEST - user manual generation, Gavin Smith, 2016/06/03
- Re: Fwd: REVIEW REQUEST - user manual generation, Andreas Schwab, 2016/06/03
- Re: Fwd: REVIEW REQUEST - user manual generation, Gavin Smith, 2016/06/03
- Re: Fwd: REVIEW REQUEST - user manual generation, Karl Berry, 2016/06/03
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/04
- Re: Fwd: REVIEW REQUEST - user manual generation, Gavin Smith, 2016/06/04
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/03
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/04
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/04
- Re: Fwd: REVIEW REQUEST - user manual generation,
Gavin Smith <=
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/06
- Re: Fwd: REVIEW REQUEST - user manual generation, Vincent Belaïche, 2016/06/12
- Re: Fwd: REVIEW REQUEST - user manual generation, Gavin Smith, 2016/06/13