News for hackers. Stuff that matters.
Re:Ante: A low-level functional language by layer8 on Friday June 17, 2022 @07:45AM (#31776754)
I guess the difference is that nesting calls (commands) is much less common in the shell, and (closely related) commands don’t really have a return value.
Re:Ante: A low-level functional language by DougBTX on Friday June 17, 2022 @08:06AM (#31776917)
On the shell, it is all the other way around, so to use command substitution it is like this:

    f $(g x)
To pass the output of g x to f.
Re:Ante: A low-level functional language by gpderetta on Friday June 17, 2022 @08:42AM (#31777246)
is it? In practice I find that my shell one liners are orders of magnitude more complex than what I would dare to write in any other 'proper' language:

   grep "hello ($(cat patterns.txt| tr '\n' '|'|grep ')$^)"  <(ssh other.host "cat ~/file.txt") |tee >(grep 'a' >As.txt) >(grep 'b' > Bs.txt)
[yes, gratuitous use of cat, sue me]