Re: trim last folder in a path



Or simply check out the dirname() and basename() functions. Okay,
basename() is what you want but they both are useful :-)

.



Relevant Pages

  • Re: trim last folder in a path
    ... >> Or simply check out the dirname() and basename() functions. ... Okay, ... antrik at users dot sf dot net ...
    (alt.php)
  • Re: dirname and basename errors
    ... Remi Villatel wrote: ... | I encountered a strange behavior of dirname and basename: ...
    (comp.os.linux.misc)
  • Re: [opensuse] bash pipe
    ... On Tuesday 30 September 2008 00:19, Brian K. White wrote: ... than the unnecessary process fork of running basename. ... I'd composed a message with this (and the dirname counterpart, ... The first gives you an empty string if you're in "/", ...
    (SuSE)
  • Re: Command-line equivalent of "Create archive of..."
    ... Use basename and dirname to get just the filename and path respectively from a combined path/filename. ... The shell command that you need to execute is: ...
    (uk.comp.sys.mac)
  • Re: dirname and basename errors
    ... > basename shoud return an empty string IMHO. ... in a slash should be interpreted as if it had a dot after it). ... write your own functions to replace basename and dirname. ...
    (comp.os.linux.misc)