[Bash] Reading from Standard Input

To read from standard input in a Bash shell, use read. The following script reads content from stanard input and outputs the content:


# Uncomment this to use comma as a separator.
# IFS=","

read first second third
echo first=\"${first}\" second=\"${second}\" third=\"${third}\"

Read more of this post


Using Sed to Process a Set of Files

In Creating a File Set Processing Script with Vim, Vim was used to quickly create a script for processing a set of files. Using Vim to generate the script works well if the operation only needs to done once. However, if you have to perform the whole operation later on another set of file, you would have to repeat the whole process. If you have Sed installed, the process may be simplified so that you can do it all on the command line.

Read more of this post