#!/bin/bash # expects a single command-line argument, a string of desired field # separators, and then asks the user to type in something, # which it then reads in based on the desired field separators # into 4 variables, whose contents are then output to standard output # # by: Sharon Tuttle # last modified: 12-2-12 # comment and uncomment to play with export impact # export IFS=$1 IFS=$1 echo "please type in something, followed by enter:" read first second third fourth echo "<\$first> is <$first>" echo "<\$second> is <$second>" echo "<\$third> is <$third>" echo "<\$fourth> is <$fourth>"