|
|
2nd method handles Carbon apps
Normally I prefer to limit ps output by using the u and c flags, thus avoiding the need for the second grep process and another pipe. In this case, however, it seems best to add a bit of inefficiency for the sake of functionality. These functions can now handle Cocoa and Carbon apps by (case-insensitive) name. For example, stop entourage and cont entourage now works.
##------stop/continue processes------##
stop () {
PID=$(ps axww | grep -i "$1" | grep -v grep | awk '{print $1}');
mkdir -p /tmp/run;
echo "$PID" > /tmp/run/"$1".pid;
kill -STOP $PID;
}
cont () {
kill -CONT $(cat /tmp/run/"$1".pid);
rm /tmp/run/"$1".pid;
}
2nd method handles Carbon apps
Is it possible to setup an external functions library for sourcing in tcsh shell? I have a few function including the above, that I would like to make available to every shell so I would like it sourced with the inits. Is it even possible in tcsh? |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|