From owner-freebsd-questions Fri Dec 17 0:40:58 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cronus.medianetwork.se (cronus.medianetwork.se [193.14.204.1]) by hub.freebsd.org (Postfix) with ESMTP id 5499D15043 for ; Fri, 17 Dec 1999 00:40:55 -0800 (PST) (envelope-from dl@tyfon.net) Received: from junglenote.com (digital01.medianetwork.se [193.14.204.219]) by cronus.medianetwork.se (8.9.3/8.7) with ESMTP id JAA22595 for ; Fri, 17 Dec 1999 09:40:53 +0100 Received: from enigmatic [127.0.0.1] by junglenote.com [localhost] with SMTP (MDaemon.v2.84.R) for ; Fri, 17 Dec 1999 09:47:41 +0100 Received: by localhost with Microsoft MAPI; Fri, 17 Dec 1999 09:47:39 +0100 Message-ID: <01BF4873.C18DD540.dl@tyfon.net> From: Dan Larsson To: "[FreeBSD-Questions-List] (E-post)" Subject: howto tokenize string in sh Date: Fri, 17 Dec 1999 09:47:38 +0100 Organization: Tyfon Internet Services [ http://tyfon.net ] X-Mailer: Microsoft Internet-e-post/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-MDaemon-Deliver-To: freebsd-questions@freebsd.org X-Return-Path: dl@tyfon.net Reply-To: dl@tyfon.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Having a string containing a path, what I need to do with it is to determine if it is relative to current or not. For this I imagine that splitting the path with the slashes as delimiters to examine the tokens in between for a token containing two dots (..) is one way of doing it. How do I do this in sh? Regards ------------ Dan Larsson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message