bzr add filename from list

Thorsten Glaser t.glaser at tarent.de
Thu Aug 2 15:15:15 UTC 2012


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



More information about the bazaar mailing list