On 2022-08-15 10:06:48 -0400, Nathan Hartman wrote: > On Sun, Aug 14, 2022 at 8:08 PM Vincent Lefevre <vincent-...@vinc17.net> > wrote: > > printf %s "$(printf "%d\n" `seq 2 8`)" > file > > One thing I don't understand about the above is why does the outer > printf %s strip the last newline from the inner one?
It is the $(...) that strips the trailing newline(s): https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03 That's why I've used that. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)