Introduction
Introduction Statistics Contact Development Disclaimer Help
Title: Redirect stdin into a variable in shell
Author: Solène
Date: 12 September 2016
Tags: shell unix
Description:
If 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
You are viewing proxied material from dataswamp.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.