Generalize the script written in exercise 13 so the character separating the list items is given as an argument to the function. If this argument is absent, the separator should default to a colon.
What will be an ideal response?
This script segment takes an option in the form –dx to specify the
delimiter x:
$ cat nodel
if [[ $1 == -d? ]]
then
del=$(echo $1 | cut -b3)
shift
else
del=:
fi
IFS=$del
set $* for i
do
echo $i
done
Computer Science & Information Technology
You might also like to view...
All VBA variables and constants are assigned ________ that describes the data that the variable or constant can hold
A) to memory B) a programmer-defined name C) a data type D) a conditional compiler
Computer Science & Information Technology
How will a decision tree perform on this data set (for the two-class problem)? What if there are four classes?
Computer Science & Information Technology