bash - How to know if a process is going to get "Permission denied" -


me@ubuntu:~$ cat /proc/10/syscall cat: /proc/10/syscall: permission denied 

i want know ahead of time if have permission access syscall.

i tried this:

file=/proc/$n/syscall     if [ -r $file ];         cat /proc/$n/syscall     else         echo "can't read"     fi 

but it's not working.

any ideas?

thanks.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -