Search code examples
pythonbashshellnautilus

Shell Scripting | Bash Programming | Custom right click in nautilus


I am trying to make a custom right click command for nautilus. I managed to find a useful content here.

What I don't understand is what does these two lines essentially mean ?

IFS_BAK=$IFS
IFS="
"

And these are present at the bottom too. What do they mean ?

Please help.


Solution

  • IFS_BAK is essentially creating a backup of existing value of IFS variable.
    The next line then assigns a new value to IFS i.e specific/required the script.
    More info on Internal Field Separator (IFS) can be found here: https://unix.stackexchange.com/questions/16192/what-is-ifs-in-context-of-for-looping
    https://unix.stackexchange.com/questions/184863/what-is-the-meaning-of-ifs-n-in-bash-scripting
    https://unix.stackexchange.com/questions/26784/understanding-ifs