Re: trim last folder in a path
- From: paul <paul@xxxxxxx>
- Date: Mon, 27 Jun 2005 19:57:26 -0700
Philip Olson wrote:
Or simply check out the dirname() and basename() functions. Okay,
basename() is what you want but they both are useful :-)
Thanks but not what I needed this time. I needed the final folder in a
long path as retrieved by getcwd() 'GET Current Working Directory'.
basename() returns the file name minus extension... which I can use
elsewhere in this script as it happens!
.
Relevant Pages
- Re: A Simple Notation
... The extension of X MINUS A contains only those ... Isn't it usually sufficient, as far as algebra is concerned, to ... that supports relations with infinite cardinality or degree can certainly ... (comp.databases.theory) - Re: A Simple Notation
... product, or as the negation of a binary product, and so on. ... A nullary sum takes on the value of the ... to mean X MINUS A for some X that I can't figure out. ... The extension of the predicate of A contains only those tuples for which ... (comp.databases.theory) - Re: more on delete from join
... Another might reasonably be that we expect whatever algebra is involved to produce consistent results for queries and updates, eg., so that "(R MINUS S) UNION S = R". ... Its extension is equal, but I would suggest that its extension is not an equivalent way of stating the relation C unless every operation we can apply to C produces the same resulting relation when it is applied to X. ... We could constrain X so that it is a join, say named XC, and get equal result relations no matter which attributes we specify in a delete. ... (comp.databases.theory) - Re: A Simple Notation
... The extension of the predicate of A contains only those tuples for which Pis true. ... The extension of X MINUS A contains only those tuples for which Pis false. ... Of course if the domains referenced in A are finite, then the set of n-tuples of objects exemplified by the predicate of A is also finite, so the complement of A is identical to the extension of X MINUS A. ... (comp.databases.theory) - Re: bash file extension name
... > string if there wasn't an extension specified. ... > The above grabs the extension but returns the filename when there isn't ... That's what basename is supposed to do. ... > I'd like the variable to be the empty string for the first file and "1" ... (comp.unix.shell) |
|