SINT - pipe with sudo

Principle: execute program by sudo and this program is command interpreter with your command as string parameter. (eg. in BASH case it's -c "string as your command | with pipeline").

$ sudo sh -c "cat /var/log/syslog | grep 'CRON'"

or

$ sudo bash -c "cat /var/log/syslog | grep 'CRON'"

author: niekto@niekde.sk (Jaroslav Petráš)

date: Thu, 26 Apr 2012 12:44:43 +0000

link: CyberAsylum.eu/sint-pipe-with-sudo