List Info

Thread: --lastarg foo




--lastarg foo
country flaguser name
United States
2007-03-28 18:42:51
URL:
  <http://sa
vannah.gnu.org/support/?105815>

                 Summary: --lastarg foo
                 Project: findutils
            Submitted by: yost
            Submitted on: Wednesday 03/28/2007 at 16:42
                Category: None
                Priority: 5 - Normal
                Severity: 1 - Wish
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

If there is a way to use xargs with commands like cp, mv,
ln, rsync, etc., I
don't know what that it is.  Problem is that these commands
(and others, of
course) don't fall into the class of programs xargs works
well with, i.e.
commands of the form
 cmd [ options ] arg ...
They are of the form
 cmd [ options] arg ... destination

Often I want to use xargs -0 with these commands to properly
handle filenames
with spaces in them.

This feature request should be crystal clear from the
following example:

Z% echo 'a
b
c
d' | xargs -n 2 --lastarg destinationDir mv
mv a b destinationDir
mv c d destinationDir
Z% 





    _______________________________________________________

Reply to this item at:

  <http://sa
vannah.gnu.org/support/?105815>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




_______________________________________________
Bug-findutils mailing list
Bug-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

--lastarg foo
country flaguser name
United States
2007-03-29 04:20:12
Update of sr #105815 (project findutils):

             Assigned to:                    None => jay 
                  

    _______________________________________________________

Follow-up Comment #1:

I should document this trick, which someone pointed out to
me recently:

$ touch foo baz ugh
$ echo foo baz ugh | xargs sh -c '/bin/mv $ bar' mv
$ ls bar
baz  foo  ugh


    _______________________________________________________

Reply to this item at:

  <http://sa
vannah.gnu.org/support/?105815>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




_______________________________________________
Bug-findutils mailing list
Bug-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )