Received: from spf3.us4.outblaze.com (spf3.us4.outblaze.com [205.158.62.25]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id iAG29Mfs005687 for ; Tue, 16 Nov 2004 02:09:22 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf3.us4.outblaze.com (Postfix) with ESMTP id 908A7539B9 for ; Tue, 16 Nov 2004 02:09:15 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTsv5-0004Io-M3 for migo@homemail.com; Mon, 15 Nov 2004 21:18:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTstx-0003g8-Kh for gnu-arch-users@gnu.org; Mon, 15 Nov 2004 21:17:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTstw-0003fi-Qd for gnu-arch-users@gnu.org; Mon, 15 Nov 2004 21:17:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTstw-0003ff-OW for gnu-arch-users@gnu.org; Mon, 15 Nov 2004 21:17:00 -0500 Received: from [144.140.70.19] (helo=gizmo09bw.bigpond.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CTsky-0003Fb-FR for gnu-arch-users@gnu.org; Mon, 15 Nov 2004 21:07:45 -0500 Received: (qmail 23872 invoked from network); 16 Nov 2004 02:07:41 -0000 Received: from unknown (HELO bwmam11.bigpond.com) (144.135.24.100) by gizmo09bw.bigpond.com with SMTP; 16 Nov 2004 02:07:41 -0000 Received: from cpe-144-132-221-212.nsw.bigpond.net.au ([144.132.221.212]) by bwmam11.bigpond.com(MAM REL_3_4_2a 180/8711022) with SMTP id 8711022; Tue, 16 Nov 2004 12:07:41 +1000 Received: by poolcompsonline.com (Postfix, from userid 1000) id 41DCE783E7; Tue, 16 Nov 2004 13:10:29 +1100 From: Zenaan Harkness To: arch Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1100571029.3076.124.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 16 Nov 2004 13:10:29 +1100 Subject: [Gnu-arch-users] avoiding symlinks X-BeenThere: gnu-arch-users@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: a discussion list for all things arch-ish List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: gnu-arch-users-bounces+migo=homemail.com@gnu.org Errors-To: gnu-arch-users-bounces+migo=homemail.com@gnu.org Status: RO Content-Length: 2058 Lines: 50 How do avoid symlinks with tla inventory? There is the following option: -f, --files list only non-directories But that clearly includes symlinks, and my sed scripts keep stopping half way through due to sed's "short circuit if any error" behaviour. I'm getting a little frustrated with manually editing files that don't get past the short-circuit, so a solution to this problem would be great! Unix "find" has various options, and bash's shell scripting conditionals include various options to distinguish between these different entities. But tla inventory doesn't, which then requires manual piping of various grep -v incantations into my pipeline, which suddenly makes the whole thing a long and laborious exercise, for what should be a simple global search and replace on my files. To be really clear on the problem: tla inventory's "--files" options assumes that symlinks to directories are "non directories", which makes sense, but when would I ever need to grep a symlink to a directory? And what makes it further frustrating, is that tla inventory is descending into a directory that is not part of my archive (it's my build/ dir); and to make it doubly frustrating, when I try to use tla inventory _inside_ this build/ dir to descend into various directories, it won't descend into sub directories if those sub directories are just symlinks, making it tla inventory not useful for my release scripts (I've resorted to custom find etc). STOP PRESS: Workaround: I just found one workaround, which uses only three extra keystrokes (although seems rather inefficient and defeats what I thought was the purpose of xargs): tla inventory ...|xargs -n 1 sed ... This results in xargs calling the command once for every argument, which has sed spew a bunch of errors (one for every symlink it comes across). FYI Zenaan _______________________________________________ Gnu-arch-users mailing list Gnu-arch-users@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/