Results 1 to 2 of 2
Hi,
Can you please explain me about following syntax...What does it mean by each of folliwing lines....
BAKIFS=$IFS
IFS=$(echo -en "\n\b")
exec 3<&0
exec 0<"$FILE"
exec 0<&3...
- 07-12-2011 #1
Some basic Syntax question
Hi,
Can you please explain me about following syntax...What does it mean by each of folliwing lines....
BAKIFS=$IFS
IFS=$(echo -en "\n\b")
exec 3<&0
exec 0<"$FILE"
exec 0<&3
- 07-12-2011 #2
Value of variable $IFS is stored in variable $BAKIFS (presumably so it can later be stored back into $IFS)
$IFS is set to a string containing newline and backspace. ($IFS is a special variable - characters in the variable's value are used by the shell as delimiters for breaking up strings into command arguments.)IFS=$(echo -en "\n\b")
File descriptor zero (standard input) is duplicated as file descriptor 3 for input.exec 3<&0
Standard input is redirected, and will be taken from the named file.exec 0<"$FILE"
File descriptor 3 (a backup copy of the original FD 0) is dup'ed back on to file descriptor zero, restoring normal input.exec 0<&3


Reply With Quote
