I am using a command,
gsettings2 monitor org.gnome.desktop.background picture-uri| cut -f2 -d "'"
This correctly gives uri for changed wallpapers. I want to pipe every such value to a function foo such that
function foo {
echo "Value changed $1"
}
executes. How do I do it?