From owner-freebsd-questions@FreeBSD.ORG Wed Oct 1 13:33:26 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE20816A4C0 for ; Wed, 1 Oct 2003 13:33:26 -0700 (PDT) Received: from pan.gwi.net (pan.gwi.net [207.5.128.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B3CD43FB1 for ; Wed, 1 Oct 2003 13:33:25 -0700 (PDT) (envelope-from ah46@mlz.us) Received: from andy.gwi.net (blake.gwi.net [207.5.142.8]) by pan.gwi.net (8.12.6p3/8.12.6) with ESMTP id h91KXOQT014876; Wed, 1 Oct 2003 16:33:24 -0400 (EDT) (envelope-from ah46@mlz.us) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20031001232109.0ae5bfd4.martin.vana@vslib.cz> X-Homepage: http://www.nachoz.com X-PGP-Key: RSA-1024 http://www.nachoz.com/andy.pub X-System-Info-DB: PostgreSQL-7.3.3 X-System-Info-RT: rt-3-0-4 X-System-Info-WM: windowmaker-0.80.2 X-System-Info-httpd: apache-1.3.28 X-System-Info-OS: FreeBSD 4.8-RELEASE-#0 Date: Wed, 01 Oct 2003 16:33:30 -0400 (EDT) Sender: aharriso@andy.gwi.net From: Andy Harrison To: Martin Vana cc: freebsd-questions@freebsd.org Subject: Re: newbie question - how to pass textfile as an argument X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2003 20:33:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On 01-Oct-2003, Martin Vana wrote message "newbie question - how to pass textfile as an argument" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 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. AFAIK, you can't. You can, however, use something like the find command. find /somedir -type f -name '*pattern*' -maxdepth 1 -exec mv {} newdir \; (maxdepth 1 limits it to the current directory, otherwise it is recursive.) ~~ Andy Harrison (full headers for details) -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQCVAwUBP3s6GVPEkLgodAWVAQHWhAQAij/sg4mNSJzdHn0ISnHF3tgdd7FVgbe0 lIHbNBZn6jFrhrd8QXSv22cHKftN/1kDsoAywB7bLVeXHgzKKek/NuWt98qE3/Rp osVwgGOj8S2c/sBm8tPjHlkcxAdQxM7MlNcMc29sDlQ+smdKYCIjKn0Nv1jPqzeP W3PmyqXefOE= =wuMG -----END PGP SIGNATURE-----