Find the answer to your Linux question:
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...
  1. #1
    Just Joined! rajeshatbuzz's Avatar
    Join Date
    Aug 2008
    Location
    Bangalore
    Posts
    4

    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

  2. #2
    Linux Newbie tetsujin's Avatar
    Join Date
    Oct 2008
    Posts
    115
    Quote Originally Posted by rajeshatbuzz View Post
    Hi,

    Can you please explain me about following syntax...What does it mean by each of folliwing lines....

    BAKIFS=$IFS
    Value of variable $IFS is stored in variable $BAKIFS (presumably so it can later be stored back into $IFS)

    IFS=$(echo -en "\n\b")
    $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.)

    exec 3<&0
    File descriptor zero (standard input) is duplicated as file descriptor 3 for input.

    exec 0<"$FILE"
    Standard input is redirected, and will be taken from the named file.

    exec 0<&3
    File descriptor 3 (a backup copy of the original FD 0) is dup'ed back on to file descriptor zero, restoring normal input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...