diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2005-04-26 23:25:40 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2005-04-26 23:25:40 +0000 |
commit | 3d18e198d27190a4bfe8acd66518773acc39f4d7 (patch) | |
tree | 668f3f5db61491526cefc7d6372f7c5bebc99e90 /filter.sh | |
parent | 14106b93fcb2cae4a8c164a5b4030b274966b422 (diff) | |
download | rpm-setup-3d18e198d27190a4bfe8acd66518773acc39f4d7.tar rpm-setup-3d18e198d27190a4bfe8acd66518773acc39f4d7.tar.gz rpm-setup-3d18e198d27190a4bfe8acd66518773acc39f4d7.tar.bz2 rpm-setup-3d18e198d27190a4bfe8acd66518773acc39f4d7.tar.xz rpm-setup-3d18e198d27190a4bfe8acd66518773acc39f4d7.zip |
- import
Diffstat (limited to 'filter.sh')
-rwxr-xr-x | filter.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/filter.sh b/filter.sh new file mode 100755 index 0000000..a59146c --- /dev/null +++ b/filter.sh @@ -0,0 +1,27 @@ +#!/bin/sh +#--------------------------------------------------------------- +# Project : Mandrake Linux +# Module : rpm +# File : filter.sh +# Version : $Id$ +# Author : Frederic Lepied +# Created On : Tue May 13 15:45:17 2003 +# Purpose : filter using grep and first argument the +# command passed as the rest of the command line +#--------------------------------------------------------------- + +GREP_ARG="$1" +PROG="$2" +shift 2 + +# use ' ' to signify no arg as rpm filter empty strings from +# command line :( +if [ "$GREP_ARG" != ' ' ] ;then + $PROG "$@" | grep -v "$GREP_ARG" +else + $PROG "$@" +fi + +exit 0 + +# filter.sh ends here |