On Thu, Oct 03, 2002 at 07:38:32PM -0400, Barry L. Kline wrote:
> "Barry L. Kline" wrote:
>
> function rpmgqa () {
> rpm -qa | grep "$1"
> }
I'm not sure what the accepted form is, but I use the syntax above for
multi-line functions and the one below for one-liners. I just find it
more compact and efficient.
rpmqag () { rpm -qa | grep "$1"; }
# Functions I use every day, from O'Reilly's "Running Linux"
tarc () { tar czvf $1.tar.gz $1; }
tart () { tar tzvf $1; }
tarx () { tar xzvf $1; }
# Keep forgetting that I'm offline...
getmail () {
/sbin/ifconfig | grep ppp0 >/dev/null 2>&1
if [ "$?" -eq "0" ]; then
fetchmail
fetchyahoo
else
echo "Network is down."
fi
}
A trivial example, but I must have endured fetchmail timing out on me
for a year before doing something about it.
Anyone else have any useful functions or aliases they'd like to show off?
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list