Date: Sun, 25 Oct 1998 21:46:50 -0600 From: Jason McNew <jase@clearsail.net> To: questions@FreeBSD.ORG Subject: find... pilot error? Message-ID: <3633F0AA.6E4A0B97@clearsail.net>
next in thread | raw e-mail | index | archive | help
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. Quoth the man page: -exec utility [argument ...]; True if the program named utility returns a zero value as its ex- it status. Optional arguments may be passed to the utility. The expression must be terminated by a semicolon (``;''). If the string ``{}'' appears anywhere in the utility name or the argu- ments it is replaced by the pathname of the current file. Utility will be executed from the directory from which find was executed. I'm not sure if this is pilot error or find is broken. Anyone got any ideas? I can write a Perl script to do the same thing but I hate to reinvent the wheel. > uname -a FreeBSD jase.clearsail.net 3.0-CURRENT FreeBSD 3.0-CURRENT #1: Sun Oct 18 01:42:11 GMT 1998 root@jase.clearsail.net:/usr/src/sys/compile/JASE i386 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?3633F0AA.6E4A0B97>