Redirect stdin into a variable in shell

NILIf you want to write a script reading stdin and put it into a

variable, there is an very easy way to procede :

#!/bin/sh

var=`cat`

echo $var

That's all

Proxied content from gemini://perso.pw/blog/articles/19.gmi (external content)

Gemini request details:

Original URL
gemini://perso.pw/blog/articles/19.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.