text parsing querry

$ A=/t1/bin/f410pdb oIFS=$IFS IFS=/
$ set -- $A
$ IFS=$oIFS
$ echo $2
t1
$ echo $3
bin
$ echo $4
f410pdb

can any one please explain me what is done with IFS[bold lines] and how it is working internally ...i am interested to know in depth

The IFS variable is the "internal field separator". It determines how the shell tokenizes arguments. For example, then you invoke a program with progname arg1 arg2 arg3, and also when you do set -- $variablename, the shell's argument list $* (and also $1, $2, $3 etc) is populated with the results of tokenizing the arguments according to the setting in IFS. Nornally, it is configured to split the input into tokens on whitespace, so the arguments to progname are arg1, arg2, and arg3, but you can change it to basically anything you like.

That's what this script does. It sets IFS to a slash, and then uses set -- $A to split the value of $A into separate tokens, using the slash as the token delimiter. So the end result is that $1 contains nothing (the "emptyness" before the first slash in $A), $2 contains the string between the first two slashes in $A, $3 contains the string between the next two slashes, etc; and also the contents of $* and $@ are updated to contain the results from the tokenization.

A helper variable oIFS is simply used to remember and finally restore the previous contents of IFS. This is just a regular variable; you can call it anything you like.

Wow! This is great information era!!

Thanks!
nua7