Copy command wont work if run from Alt-F2
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 Why is it so? How do I correct this? Thanks |
you need to add set -xv to your script and save the output somewhere (to check what's happening).
|
my guess is you can't input password for sudo
visudo if you know what you are doing, or try gksudo instead of sudo that should popup a password prompt but I've never tried it via Alt+F2 |
Quote:
|
Quote:
Code:
ls -l /usr/local/bin/post-opera-update |
Quote:
|
yes, would be nice to know what do you mean by Alt-F2.
|
ahh, Alt+F2 brings up a quick command line on , gnome I think
other desktops may do it Quote:
edited sudoers for no password on that script did you run the script with sudo in the Alt+F2? |
Quote:
|
1 Attachment(s)
ALT-F2 - Run Command in Gnome desktop.
Output is 0 -rw-rw-r--. 1 user user 0 Sep 20 15:49 debg.txt |
Quote:
cmp and sudo may need full paths I'm not sure where teh alt+F2 gets its env. from I can't really test as I don't have .. I may have gnome on laptop |
also try full path for your script. (obviously) that is not the "current" directory, but another one (some default).
|
Quote:
|
you will also need to redirect stderr
2>&1 sends stderr to stdout |
Quote:
My script Code:
cat /usr/local/bin/post-opera-update |
All times are GMT -5. The time now is 03:45 AM. |