[vox-tech] Shell Scripting Question: Getting a directory name from a 'find' result
Ken Bloom
vox-tech@lists.lugod.org
Mon, 23 Jun 2003 17:04:58 -0700
--/NkBOFFp2J2Af1nK
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 2003.06.23 10:54, Richard Crawford wrote:
> Suppose I have a short script as such:
>=20
> find . -name 'wwwboard.html' -print | while read i
> do
> print $i
> done
>=20
> how can I pass the name of the directory where $i lurks to another
> variable, such as $dir?
>=20
In csh, the appropriate syntax would be $i:r
--=20
I usually have a GPG digital signature included as an attachment.
If you don't know what it is, either ignore it or visit www.gnupg.org
My PGP key was last signed 6/10/2003 please download my key again if
it is more recent than your copy. If you use GPG, *please* talk to
me to sign it. The key is keyID E2B2CAD1 on pgp.mit.edu
--/NkBOFFp2J2Af1nK
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA+95WqlHapveKyytERAka4AJ9uCYDFTG0wd77Rr+i+heEj+8m6IACfTwRm
+yooYHvLjSB6pvAHeMW1HKw=
=Lfz+
-----END PGP SIGNATURE-----
--/NkBOFFp2J2Af1nK--