permission script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I just wrote a little script, that will echo a message to the user, if it doesn't have enough permission:

$ if ! [ "$(env LC_MESSAGES=C ifconfig wlan0 down | grep -i denied)" == "" ]; then echo "no permission"; fi
SIOCSIFFLAGS: Permission denied
$ sudo su
[sudo] password for USER:
# if ! [ "$(env LC_MESSAGES=C ifconfig wlan0 down | grep -i denied)" == "" ]; then echo "no permission"; fi
#

but it won't works

why?

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux