On Wed, Dec 05, 2007 at 02:25:58PM -0500, Adam Katz wrote:
> I'd argue for my alternative; nix the case statement and tack on an extra
> colon to the end of $PATH when called on line 46, like:
>
>for ELEMENT in $PATH:; do
>
> The corner cases where it loops an extra time should be extremely r
> For the record, ": foo" is a not entirely uncommon alternative way to
> write comments in Bourne shell it's also the only way to squeeze a
> comment and a trailing ";;" onto a single line.
Wow, I've never seen that outside DOS.bat scripts, but yes, it does that.
You can't have a comment followin
On Wed, Dec 05, 2007 at 01:49:30PM -0500, Clint Adams wrote:
> On Wed, Dec 05, 2007 at 05:45:46PM +, Colin Watson wrote:
> > Adam Katz wrote:
> > > In the event there IS an empty string in handed to the loop on line 46,
> > > nothing will happen unless the argument ("$PROGRAM") happens to exist
On Wed, Dec 05, 2007 at 05:45:46PM +, Colin Watson wrote:
> > In the event there IS an empty string in handed to the loop on line 46,
> > nothing will happen unless the argument ("$PROGRAM") happens to exist as
> > a file in / with executable permissions (assuming you remove lines
> > 47-49, ot
# Regression; see below.
reopen 453345
thanks
On Wed, Nov 28, 2007 at 05:31:16PM -0500, Adam Katz wrote:
> Two bits of extraneous code to remove:
>
> lines 30-33:
> 30 case $PATH in
> 31 *::) : "not *DIR:" ;;
> 32 *:) PATH="$PATH:" ;;
> 33 esac
>
> Unless this is for some weird nonsta
Okay, I did a little more homework on Bourne and found you are right; a
trailing colon in the $PATH does indeed put the current directory at the
end, and a double-colon in the path does indeed count as the current
directory. I knew neither of these things. This mostly retracts my
suggestions.
>
On Wed, Nov 28, 2007 at 05:31:16PM -0500, Adam Katz wrote:
> Two bits of extraneous code to remove:
>
> lines 30-33:
> 30 case $PATH in
> 31 *::) : "not *DIR:" ;;
> 32 *:) PATH="$PATH:" ;;
> 33 esac
>
> Unless this is for some weird nonstandard bourne implementation, the
> argument "no
Package: debianutils
Version: 2.25.1
Severity: minor
Two bits of extraneous code to remove:
lines 30-33:
30 case $PATH in
31 *::) : "not *DIR:" ;;
32 *:) PATH="$PATH:" ;;
33 esac
Unless this is for some weird nonstandard bourne implementation, the
argument "not *DIR:" to the colon (:
8 matches
Mail list logo