While quoting can be difficult at time, one can make his life simpler
DELIM=\'
CHAR="[^$DELIM]"
REGEX="$CHAR*$DELIM($CHAR+)$DELIM$CHAR*"
$ echo "
Error: Cannot find file '/missing/file_1'.
Error: Cannot find file '/missing/file_2'.
" | while read line; do
if [[ $line =~ $REGEX ]]; then
On Thu, Mar 23, 2017 at 10:14:01PM -0700, Pádraig Brady wrote:
> OK let's not derail this into a discussion specific to errexit.
> Can we please improve things?
> You say to not use errexit, and instead use `|| exit 1` where appropriate.
> In that case can we fix this case?
>
> set -o pipefail
>
Remember that bash's grammar is derived from the specification of the
POSIX shell
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html).
Also, any addition to the bash grammar should be backwards compatible
(or enabled with a shopt, disabled by default), to avoid breaking
alre
Op 18-03-17 om 14:40 schreef Martijn Dekker:
> Op 27-02-17 om 21:03 schreef Chet Ramey:
>> If you think you have a winning argument, initiate a new discussion with
>> the Austin Group. You might want to dig up the mail archives from
>> October, 2014 and look at the discussion that preceded interpr
On 24/03/17 04:57, Greg Wooledge wrote:
> On Thu, Mar 23, 2017 at 10:14:01PM -0700, Pádraig Brady wrote:
>> OK let's not derail this into a discussion specific to errexit.
>> Can we please improve things?
>> You say to not use errexit, and instead use `|| exit 1` where appropriate.
>> In that case
Hi,
(Currently using Bash-4.4_p12 on Gentoo GNU/Linux).
My PS1 contains colors, and thus \[ ... \] sequences around
colors, for proper line wrapping on the command-line.
I want to fake this prompt from my ~/.bashrc, because OCD,
before I execute some commands printing stuffs in the shell.
The p
Configuration Information [Automatically generated, do not
change]: Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/sha