bzr add filename from list

john welford john.welford at gmail.com
Thu Aug 2 18:08:13 UTC 2012


Thanks for that. I am using windows but the tools (sed and xargs) here
worked for me:
http://gnuwin32.sourceforge.net/

I was also able to get around the spaces issue (in the standard windows7
shell) by putting the filenames in quotes during my sed command.

Seems to be working fine!
John

On Thu, Aug 2, 2012 at 4:15 PM, Thorsten Glaser <t.glaser at tarent.de> wrote:

> On Thu, 2 Aug 2012, john welford wrote:
>
> > Is it possible to add a list of files to bzr from the command line
> either by piping them from a previous
> > command (in my case a sed command) or by referencing a text file
> containing all the file locations? I've
> > tried a few things but can't get it working.
>
> xargs bzr add <file
>
> But only if your filenames don't contain spaces.
>
> Otherwise (needs a Korn Shell such as mksh (or its ancestor
> pdksh) or ksh93) installed:
>
> set -A names; while IFS= read -r name; do names[${#names[*]}]=$name; done
> <file; bzr add "${names[@]}"
>
> bye,
> //mirabilos
> --
> tarent solutions GmbH
> Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
> Tel: +49 228 54881-393 • Fax: +49 228 54881-314
> HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
> Geschäftsführer: Boris Esser, Sebastian Mancke
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20120802/d8446ac6/attachment.html>


More information about the bazaar mailing list