Copy command wont work if run from Alt-F2
by ddenial from LinuxQuestions.org on (#4QS94)
Hello
This is a part in my shell script - which basically compares two files and if they are different, overwrites the other
Code:if ! cmp --silent /backup/libffmpeg.so /usr/lib64/opera/libffmpeg.so ; then
notify-send "Different"
sudo cp -af /backup/libffmpeg.so /usr/lib64/opera/libffmpeg.so
fiIf I tun this script from a terminal, the cp command works perfectly. But if I run this script from Alt-F2 the scripts enter 'if' loop, executes the notify-send command, however, won't copy/replace the file.
Why is it so? How do I correct this?
Thanks


This is a part in my shell script - which basically compares two files and if they are different, overwrites the other
Code:if ! cmp --silent /backup/libffmpeg.so /usr/lib64/opera/libffmpeg.so ; then
notify-send "Different"
sudo cp -af /backup/libffmpeg.so /usr/lib64/opera/libffmpeg.so
fiIf I tun this script from a terminal, the cp command works perfectly. But if I run this script from Alt-F2 the scripts enter 'if' loop, executes the notify-send command, however, won't copy/replace the file.
Why is it so? How do I correct this?
Thanks