[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string escaping in bash
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: string escaping in bash |
Date: |
Fri, 12 Mar 2021 20:28:29 +0100 |
i dunno ..thats what its supposed to give, \\ give a \
so the dude wanted in his initial mail[s]
On Fri, Mar 12, 2021 at 8:27 PM Lawrence Velázquez <vq@larryv.me> wrote:
> > On Mar 12, 2021, at 2:08 PM, Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
> wrote:
> >
> > in my logic it expanded fine, and im experienced
> > i dont wanna claim what isnt, i just say dont say it wont work till its
> > proven so
>
> bash-5.1$ str='slash slash one \\1'
> bash-5.1$ str=${str//\\\\/$'\1'} str=${str//\\n/$'\n'}
> str=${str//\\t/$'\t'}
> bash-5.1$ str=${str//$'\1'/\\}
> bash-5.1$ printf '%s\n' "$str"
> slash slash one \1
>
> --
> vq
- Re: string escaping in bash, (continued)
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Peng Yu, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Peng Yu, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Peng Yu, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Lawrence Velázquez, 2021/03/12
- Re: string escaping in bash,
Alex fxmbsw7 Ratchev <=
- Re: string escaping in bash, Lawrence Velázquez, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Lawrence Velázquez, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: string escaping in bash, Alex fxmbsw7 Ratchev, 2021/03/12