Date: Fri, 17 Dec 1999 10:04:55 +0100 From: Dan Larsson <dl@tyfon.net> To: "[FreeBSD-Questions-List] (E-post)" <freebsd-questions@freebsd.org> Subject: Followup: howto tokenize string in sh Message-ID: <01BF4876.2B909660.dl@tyfon.net>
next in thread | raw e-mail | index | archive | help
I know a echo "path../../is/relative" | awk -F/ '{print $n}' prints one token but I don't know how to evaluate all with ".." and return true if ".." is found in a token. Regards ------------ Dan Larsson 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 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?01BF4876.2B909660.dl>