Hi,
> On Aug 22, 2020, at 10:13 PM, Budi wrote:
>
> How anchor to line end in bash regex [[ ]]
> h=hi
> [[ $h =~ ^hi\$ ]] && echo Yes
>
> cannot work, or is it bug yet
Special characters are matched literally if they are quoted, so you
just have to make sure the $ is not quoted.
$ h=h
Hi, I have a question on the behavior of the new array PROMPT_COMMANDS
and the best practice to use it.
In coming Bash 5.1, the new array variable `PROMPT_COMMANDS' is
available in the replacement of `PROMPT_COMMAND'. When the array
`PROMPT_COMMANDS' has one or more elements, the scalar version
`
How anchor to line end in bash regex [[ ]]
h=hi
[[ $h =~ ^hi\$ ]] && echo Yes
cannot work, or is it bug yet