[Bash] Reading from Standard Input
27 October, 2012 3 Comments
To read from standard input in a Bash shell, use read. The following script reads content from stanard input and outputs the content:
#!/bin/sh # Uncomment this to use comma as a separator. # IFS="," read first second third echo first=\"${first}\" second=\"${second}\" third=\"${third}\"