From owner-freebsd-questions Sun Oct 25 23:45:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA12817 for freebsd-questions-outgoing; Sun, 25 Oct 1998 23:45:37 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dt053nb4.san.rr.com (dt053nb4.san.rr.com [204.210.34.180]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA12808 for ; Sun, 25 Oct 1998 23:45:35 -0800 (PST) (envelope-from Studded@gorean.org) Received: from gorean.org (Studded@localhost [127.0.0.1]) by dt053nb4.san.rr.com (8.8.8/8.8.8) with ESMTP id XAA03357; Sun, 25 Oct 1998 23:44:58 -0800 (PST) (envelope-from Studded@gorean.org) Message-ID: <3634287A.1900A74E@gorean.org> Date: Sun, 25 Oct 1998 23:44:58 -0800 From: Studded Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 2.2.7-STABLE-1015 i386) X-Accept-Language: en MIME-Version: 1.0 To: Jason McNew CC: questions@FreeBSD.ORG Subject: Re: find... pilot error? References: <3633F0AA.6E4A0B97@clearsail.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jason McNew wrote: > > After reading the find man page, I tried using: > find / -name "*.mp3" -exec mpg123 {}; > and it tells me: > find: -exec: no terminating ";" > if I do: > find / -name "*.mp3" -exec mpg123 {}\; > it runs ok, but mpg123 just gives me syntax help a few times. > So, I tried: > find / -name "*.mp3" -exec echo {}\; > and it just spits out a bunch of blank lines. > Although: > find / -name "*.mp3" -print > works exactly how i'd expect it. I don't know what mpg123 expects as an argument, but in a case like this I fall back on my shell. Assuming you're using Bash or sh, this should work: for FILE in `find / -name '\*.mp3'`; do mpg123 $FILE done You might also get better results using the '\*.mp3' with the -exec line, but the script above should work. Good luck, Doug -- *** Chief Operations Officer, DALnet IRC network *** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message