Skip to main content
Splitting into three distinct answers
Source Link
Qeole
  • 601
  • 7
  • 16

Bash

<<< echo echo echo

or

`echo echo echo`

Both commands output echo, of course.

Haskell

Classic:

let 1+1="Hello World!" in 1 + 1

Outputs Hello World!. No kidding.

dc

dc can be used with pretty obscure expressions. Here is an example, nearly asking you a question! (second line):

dc -e '[<!][P[ ]P]sr[|]30 4+[p]5[ ]500d+300dZ73 16d6-r[PnPnPnPP]sa[sz-=r2;h*7+++[know ]lax]sb
    vv:ha7 d0 [you] sp[eak?]                                                             lbx'

Output: I know 1337 5p34|<!

Edit: splitting original answer into three different ones (bash and haskell proposals in separate posts)

Bash

<<< echo echo echo

or

`echo echo echo`

Both commands output echo, of course.

Haskell

Classic:

let 1+1="Hello World!" in 1 + 1

Outputs Hello World!. No kidding.

dc

dc can be used with pretty obscure expressions. Here is an example, nearly asking you a question! (second line):

dc -e '[<!][P[ ]P]sr[|]30 4+[p]5[ ]500d+300dZ73 16d6-r[PnPnPnPP]sa[sz-=r2;h*7+++[know ]lax]sb
    vv:ha7 d0 [you] sp[eak?]                                                             lbx'

I know 1337 5p34|<!

dc

dc can be used with pretty obscure expressions. Here is an example, nearly asking you a question! (second line):

dc -e '[<!][P[ ]P]sr[|]30 4+[p]5[ ]500d+300dZ73 16d6-r[PnPnPnPP]sa[sz-=r2;h*7+++[know ]lax]sb
    vv:ha7 d0 [you] sp[eak?]                                                             lbx'

Output: I know 1337 5p34|<!

Edit: splitting original answer into three different ones (bash and haskell proposals in separate posts)

Source Link
Qeole
  • 601
  • 7
  • 16

Bash

<<< echo echo echo

or

`echo echo echo`

Both commands output echo, of course.

Haskell

Classic:

let 1+1="Hello World!" in 1 + 1

Outputs Hello World!. No kidding.

dc

dc can be used with pretty obscure expressions. Here is an example, nearly asking you a question! (second line):

dc -e '[<!][P[ ]P]sr[|]30 4+[p]5[ ]500d+300dZ73 16d6-r[PnPnPnPP]sa[sz-=r2;h*7+++[know ]lax]sb
    vv:ha7 d0 [you] sp[eak?]                                                             lbx'

I know 1337 5p34|<!