Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2003 15:32:09 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Martin Vana <martin.vana@vslib.cz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: newbie question - how to pass textfile as an argument
Message-ID:  <20031001203209.GA2421@dan.emsphone.com>
In-Reply-To: <20031001232109.0ae5bfd4.martin.vana@vslib.cz>
References:  <20031001232109.0ae5bfd4.martin.vana@vslib.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 01), Martin Vana said:
> I was just wondering if there is a way how to pass a text file with
> list of path/files to programs like cp/mv.

If the list is small (less than 65000 characters total):

  cp $(cat myfile) /otherdir/

If the list is large:

  xargs < myfile -J% cp % /otherdir/

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031001203209.GA2421>