Home > Technical, unix commands > split in shell script

split in shell script

January 13, 2012

OLDIFS=$IFS
set -f
IFS=’,’ # comma is my delimitter
LISTARRAY=($LIST)
set +f

IFS=$OLDIFS
for i in ${listARRAY[@]}
do
echo “$i”
done

Advertisements
Categories: Technical, unix commands
%d bloggers like this: