ok, i found a typo, there should be
if [ $old_new_diff != "" ] ; then echo $new_path
instead of
if [ old_new_diff != "" ] ; then echo $new_path
but here's another problem ... how to cut of the first part of adress? lets say that output of echo $new_path is
/tmp/tmp.OmujWm1931/new/hello/dir
and i want just /hello/dir
I tried
echo $new_path | sed "s/$tmpdirnew//"
but it says that : expression #1, char 8: unknown option to `s'
any ideas?
//edit, ok, i've done this too using regexes, but i'm still curious, why the sed above didn't work