Text through Asciidoctor via stdin - how?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Text through Asciidoctor via stdin - how?

Esben
Hi!

I'm on linux.

How do I pass text to Asciidoctor via stdin?

echo 'hey' | asciidoctor

yields an error and just gives me the help-info


Reply | Threaded
Open this post in threaded view
|

Re: Text through Asciidoctor via stdin - how?

Esben
Funny how you realise how to do things, once you ask in a forum :)

The way to get asciidoctor to recognize text from stdin is to use a hyphen as argument

echo 'hey' | asciidoctor -
Reply | Threaded
Open this post in threaded view
|

Re: Text through Asciidoctor via stdin - how?

mojavelinux
Administrator
In reply to this post by Esben
The asciidoctor command follows the Unix convention of using a hyphen to tell the command to read from stdin.

echo hi | asciidoctor -


Best Regards,

-Dan

-Dan

On Sat, Dec 5, 2020 at 3:11 AM Esben [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi!

I'm on linux.

How do I pass text to Asciidoctor via stdin?

echo 'hey' | asciidoctor

yields an error and just gives me the help-info





If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Text-through-Asciidoctor-via-stdin-how-tp8378.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Text through Asciidoctor via stdin - how?

Esben
That's odd - I am doing a lot of Bash-scripting these days, and I've never met it before. Now I know!