Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Oct 1998 23:44:58 -0800
From:      Studded <Studded@gorean.org>
To:        Jason McNew <jase@clearsail.net>
Cc:        questions@FreeBSD.ORG
Subject:   Re: find... pilot error?
Message-ID:  <3634287A.1900A74E@gorean.org>
References:  <3633F0AA.6E4A0B97@clearsail.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3634287A.1900A74E>