News for hackers. Stuff that matters.
Re:Nushell.sh ls | where size > 10mb | sort-by modified by Arnavion on Sunday March 12, 2023 @04:31PM (#35125856)
>But most of all the cat way just aligns with my mental model more. Data flows left to right, if you catch my drift.

Using `<` doesn't change that model. You can write `< somefile.txt whatever`. I always write my commandlines as `<in_file cmd1 | cmd2 | cmd3 >out_file`

(Though annoyingly this doesn't work for feeding input to while loops. `< <(echo a; echo b; echo c;) while read -r foo; do echo "$foo"; done` is invalid syntax; it needs to be `while read -r foo; do echo "$foo"; done < <(echo a; echo b; echo c;)`)

Re:Nushell.sh ls | where size > 10mb | sort-by modified by ilyt on Sunday March 12, 2023 @06:49PM (#35127472)
> Using `<` doesn't change that model. You can write `< somefile.txt whatever`.

If you showed that without context it would look like some prefix/lispy notation so no, you are just showing how bad it is

Re:Nushell.sh ls | where size > 10mb | sort-by modified by Arnavion on Sunday March 12, 2023 @07:18PM (#35127966)
"This thing I don't understand reminds me of another thing I don't understand, so it's bad I decided."
Re:Nushell.sh ls | where size > 10mb | sort-by modified by ilyt on Sunday March 12, 2023 @08:26PM (#35128804)
The poster above complains it does not read left to right well.

So you give more examples that do not read left to right well.

Please take your smol brains takes elsewhere

Re:Nushell.sh ls | where size > 10mb | sort-by modified by mtlmtlmtlmtl on Sunday March 12, 2023 @09:10PM (#35129240)
I thought it was an informative response. I certainly learned some stuff about shell I didn't know before. I'm still gonna use cat because it's simpler to me.

I think your snark is unfounded here.

Re:Nushell.sh ls | where size > 10mb | sort-by modified by cerved on Monday March 13, 2023 @01:29AM (#35131481)
doesn't it work if you put it after the while but before the read?
Re:Nushell.sh ls | where size > 10mb | sort-by modified by Arnavion on Monday March 13, 2023 @12:05PM (#35137623)
No. That will execute `< <(...) read` anew for every loop iteration, which in this case will cause it to print an endless stream of `a`s.