GNU bug report logs - #5926
feature request: mv -p to create missing target dir

Previous Next

Package: coreutils;

Reported by: Rodolfo Borges <rodolfo.borges <at> gmail.com>

Date: Sun, 11 Apr 2010 14:10:02 UTC

Severity: wishlist

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rodolfo Borges <rodolfo.borges <at> gmail.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 5926 <at> debbugs.gnu.org, bob <at> proulx.com
Subject: bug#5926: feature request: mv -p to create missing target dir
Date: Sun, 25 Apr 2010 10:38:04 -0300
On Sun, Apr 25, 2010 at 10:29 AM, Stefano Lattarini
<stefano.lattarini <at> gmail.com> wrote:
> Just a few obsevations on side issues...
>
>> >     $(which mv) "$@"
> I think that's needed because otherwise the shell function would end
> up calling itself recursively, since it's named `mv' too.

exactly.


>> The 'which' command is another one of those simple but not very
>> portable commands that does different things on different systems.
> Since Rodolfo is assuming bash as his shell, he could have used:
>  $(type -P mv) "$@"
> instead, which is more "portable" because it just uses bash builtins.

thanks, stefano.
didn't know about type -P




This bug report was last modified 10 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.