Re: execline, s6-portable-utils: print a file to stdout

2018-07-26 Thread Profpatsch


Laurent Bercot  writes:

>>I haven’t found a way to print a file to stdout with either
>>execline nor s6-portable-utils. The `s6-cat` utility only
>>echoes stuff that is already coming from stdin,
>>and unlike the shell, execline doesn’t have `<`.
>
>  https://skarnet.org/software/execline/redirfd.html
>
>  "redirfd -r 0 $file s6-cat" will print $file to stdout.

oooh, that’s a powerful command. Dunno how I missed that,
I think I was too focused on finding something less general.

I think I might start writing a FAQ for these things.

-- 
Written with Emacs (mu4e) on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es/
May take up to five days to read your message. If it’s urgent, call me.


Re: execline, s6-portable-utils: print a file to stdout

2018-07-24 Thread Laurent Bercot

I haven’t found a way to print a file to stdout with either
execline nor s6-portable-utils. The `s6-cat` utility only
echoes stuff that is already coming from stdin,
and unlike the shell, execline doesn’t have `<`.


 https://skarnet.org/software/execline/redirfd.html

 "redirfd -r 0 $file s6-cat" will print $file to stdout.

--
 Laurent



execline, s6-portable-utils: print a file to stdout

2018-07-24 Thread Profpatsch
Sorry for my spam of mails, I want to separate my questions
by topic so they will be searchable.

I haven’t found a way to print a file to stdout with either
execline nor s6-portable-utils. The `s6-cat` utility only
echoes stuff that is already coming from stdin,
and unlike the shell, execline doesn’t have `<`.

Maybe some kind of output utility might be nice?
The Lisp dialect Clojure has `slurp` and `spit`:
https://clojuredocs.org/clojure.core/slurp
https://clojuredocs.org/clojure.core/spit

-- 
Written with Emacs (mu4e) on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es/
May take up to five days to read your message. If it’s urgent, call me.