groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] What does 'groff <<<foo' do?


From: Ted Harding
Subject: Re: [Groff] What does 'groff <<<foo' do?
Date: Sun, 02 Dec 2012 19:02:21 -0000 (GMT)

On 02-Dec-2012 18:40:11 Clarke Echols wrote:
> In a recent email the syntax:
> 
>      groff <<<foo ...
> 
> was used.
> 
> I've used Unix/Linux for over 25 years, and I've never seen
> that "triple redirect" before.  What does it do?  I get nowhere
> with a Google search because it ignores the '<<<'.
> 
> Thanks,
> Clarke

It surprised me too! Never seen it before. However, rather than
mess about feeding mysteries to groff, I tried some simple
experiments with 'cat':

$ cat <<<foo
foo

$ cat <<< foo
foo

$ cat <<foo
> This is input
> foo
This is input

$ cat << <foo
bash: syntax error near unexpected token `<'

$ cat < <<foo
bash: syntax error near unexpected token `<<'

While everything else does what one naturally expects,
'cat <<<foo' or 'cat <<< foo' seems to be a way of passing
what follows the "<<<" directly to the command, as if equivalent
to "echo foo | cat".

That's my take on it, anyway!
Best wishes,
Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 02-Dec-2012  Time: 19:02:15
This message was sent by XFMail
-------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]