From owner-freebsd-hackers Sun Apr 23 04:16:34 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA22000 for hackers-outgoing; Sun, 23 Apr 1995 04:16:34 -0700 Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id EAA21994 for ; Sun, 23 Apr 1995 04:16:30 -0700 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.6.9/8.6.9) id EAA27389; Sun, 23 Apr 1995 04:16:25 -0700 Date: Sun, 23 Apr 1995 04:16:25 -0700 Message-Id: <199504231116.EAA27389@silvia.HIP.Berkeley.EDU> To: hackers@FreeBSD.org Subject: strange behavior with sh and dangling symlinks From: asami@cs.berkeley.edu (Satoshi Asami | =?ISO-2022-JP?B?GyRCQHUbKEI=?= =?ISO-2022-JP?B?GyRCOCsbKEIgGyRCOC0bKEI=?=) Sender: hackers-owner@FreeBSD.org Precedence: bulk The below is on a 0416-snap system Rod put together for me. (It happens on older systems too.) ===== >> sh $ ls $ mkdir a $ ln -s ../b a $ echo */b */b $ touch b $ echo */b a/b $ /bin/rm b $ echo */b */b $ echo a/* a/b $ ls -lL a total 0 lrwxr-xr-x 1 asami grad 4 Apr 23 04:11 b -> ../b $ ===== In short, "*/filename" doesn't expand properly when the target of the symlink doesn't exist. "dirname/*" does expand, so this is inconsistent, to say the least. This happens only in sh. tcsh and bash expands everything fine. (I found this trying to track down why bsd.port.mk was behaving funnily when I removed the "real" package in .packages/ before removing the symlinks in other subdirs....) Satoshi