[clug] Favourite shell one liner
kim holburn
kim at holburn.net
Wed Dec 21 00:54:14 MST 2011
It would be easy enough to do these as one liners I suppose but I find
them very useful:
myps ()
{
if [ $# -gt 0 ]; then
ps -awwwxo "pid ppid %cpu %mem user command" | egrep "PID|$1" |
grep -v grep;
else
ps -awwwxo "pid ppid %cpu %mem user command";
fi
}
I may as well include the other one:
pse ()
{
if [ $# -gt 0 ]; then
ps -awwwexo "pid ppid %cpu %mem user command" | egrep "PID|$1"
| grep -v grep;
else
ps -awwwexo "pid ppid %cpu %mem user command";
fi
}
On Tue, Dec 20, 2011 at 9:46 PM, Hal Ashburner <hal at ashburner.info> wrote:
> Hi Clug!
>
> What's your favourite* shell** one liner?
--
Kim Holburn
IT Network & Security Consultant
Ph: +61 2 61402408 M: +61 404072753
mailto:kim at holburn.net aim://kimholburn
skype://kholburn - PGP Public Key on request
More information about the linux
mailing list