Am 01.11.2014 um 23:15 schrieb cpu memhd: > Hello, > > That is a nifty expandpath(). Only thing is, I think it should get rid of > redundant slashes: //some/path//here. No need to call it expandpath2, should > be replaced IMO.
Maybe this way?
#
# expandpath2 IMHO better
#
expandpath2 () {
case $1 in
//*) echo `echo $1 | sed -e 's/^[/]*/\//'` | sed -e
s/[/]*$// ;;
/*) echo $1 | sed -e s/[/]*$// ;;
*) echo `pwd`/`echo $1 | sed -e s/^[.][/]*//g` |
sed -e s/[/]*$// ;;
esac
}
but this does more than the original expandpath
cheers
Erich
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------
_______________________________________________ leaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/leaf-devel
