topics

全部话题 - 话题: origifs
(共0页)
b**********e
发帖数: 13
1
来自主题: Unix版 - IFS shell script
I am new to shell script. Could some one explain the following line?
ORIGIFS="$IFS"
IFS="${IFS}:"
set -- $1
IFS="$ORIGIFS"
echo $1
I understand that IFS is the internal field seperator. in the first line
ORIGIFS already been given the value $IFS, and IFS been given the value
${IFS}: but why does IFS given the value $ORIGIFS again?
Many thanks!
(共0页)