[ILUGC] Re: help to understand this bash output

  • From: Mohan R <mohan43u@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Sun, 15 Jan 2023 05:33:35 +0100

Hi,

On Sat, Jan 14, 2023 at 8:03 PM M K Saravanan <mksarav@xxxxxxxxx> wrote:

$ echo '1 2 3 4 5 6' | while read a b c; do
echo result: $c $b $a;
done
result: 3 4 5 6 2 1

What logic is used to arrive at that answer?

which part of this commandline you don't understand? how many commands
are in this commandline? what each command does? Which command are you
not able to understand how it worked in this commandline?

Thanks,
Mohan R
---
Mailing List Guidelines: https://ilugc.in/mailing-list-guidelines
Web: http://ilugc.in/
Internet Relay Chat: #ilugc on libera.chat

Other related posts: