help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is a for .. do list newline sensitive ?


From: Zachary Santer
Subject: Re: is a for .. do list newline sensitive ?
Date: Sat, 14 Oct 2023 15:41:00 -0400

On Sat, Oct 14, 2023 at 3:05 PM Lawrence Velázquez <vq@larryv.me> wrote:

> If for some reason you *really* want to keep the variable and word
> list on separate lines, you can break before "in".  This is portable.
>
I imagine a backslash after "in" is also portable.

for x in \
  for bar baz
do
  printf '%s' "${x}"
done
echo

That might look a little nicer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]