[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-grep] egrep and fgrep script assume path
From: |
Stepan Kasal |
Subject: |
Re: [bug-grep] egrep and fgrep script assume path |
Date: |
Thu, 27 Jan 2005 16:42:43 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi Paul,
thanks for explaining me.
> if { dir=${0%/*} } 2> /dev/null; then
With bash, I need a semicolon before }. A typo?
So would the following be OK with you?
Stepan
#!/bin/sh
case $0 in
*/*) if { dir=${0%/*}; } 2>/dev/null; then
dir=${0%/*}/
else
dir=`dirname "$0"`
test "x$dir" != x && dir=$dir/
fi ;;
*) dir="" ;;
esac
exec "${dir}"grep -E ${1+"$@"}
- Re: [bug-grep] egrep and fgrep script assume path, (continued)
- Re: [bug-grep] egrep and fgrep script assume path, Paul Jarc, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path, Stepan Kasal, 2005/01/26
- Re: [bug-grep] egrep and fgrep script assume path, Paul Jarc, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path, Stepan Kasal, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path, Paul Jarc, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path,
Stepan Kasal <=
- Re: [bug-grep] egrep and fgrep script assume path, Paul Jarc, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path, Stepan Kasal, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path, Paul Eggert, 2005/01/27
- Re: [bug-grep] egrep and fgrep script assume path, Stepan Kasal, 2005/01/28
- Re: [bug-grep] egrep and fgrep script assume path, Paul Eggert, 2005/01/29
- Re: [bug-grep] egrep and fgrep script assume path, Stepan Kasal, 2005/01/29
- Re: [bug-grep] egrep and fgrep script assume path, Paul Eggert, 2005/01/31
Re: [bug-grep] egrep and fgrep script assume path, Aharon Robbins, 2005/01/27