AchBall Mac OS

How to Install Archibald for Windows PC or MAC: Archibald is an Android Lifestyle app that is developed by Archibald microbrasserie and published on Google play store on NA. It has already got around 10000 so far with an average rating of 3.0 out of 5 in play store. The Week in Mac Apps: Image editors, a menu bar music app, and more Review: Extensis Suitcase Fusion 6 brings 'Fontspiration' to designers Video: Tim Cook speaks at WSJD Live about Apple Watch, Apple Pay, and more. Archibald's Adventures. Help Archie to overcome all of the pitfalls of the Dr. Klumpfus mansion in this funny action puzzle game. Test your skills and wit in more than 100 uncanny levels! Archibald offers gameplay mixed of action and puzzle elements with gradually rising complexity.


Mac os mojave
A more efficient replacement for basename 5 comments Create New Account
AchBall Mac OS
Click here to return to the 'A more efficient replacement for basename' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.

The two examples given are in error (probably a typo).
The first example using basename should be
<b>
FULLPATH=/usr/bin/archibald
Filename=`basename $FULLPATH`
</b>
and second example using the Shell substitution should be
<b>
FULLPATH=/usr/bin/archibald
Filename='${FULLPATH##*/}'
</b>
Regards... Barry Sharp

If you're writing a shell script that you want to take to another platform at a later time, you don't want to use non-posix features. If you're running that script on Solaris, you have to be even more careful as it's /bin/sh isn't posix compliant.
Built in feature of ksh/zsh/bash like arithmatic '(( foo = foo + 1 ))' or 'let foo = foo + 1' and this 'basename' functionality aren't part of the posix standard (or they might be but they won't work in /bin/sh for some versions of Unix, most notably Solaris).

Agreed -- if portability across various UNIX flavors is paramount to your shell script's operation then one must obviously consider the aspect you describe. However, putting that aside (and of course one can always case the Shell substitution method to avoid its use) removing basename from multiple execution in the hundreds or thousands can be beneficial.
I'm responsible for health monitoring systems at my workplace and any reduction in process creation over the span of years makes our system more productive. As I said in the original post/hint, performance/productivity is obtained in a step-by-step process.
Thanks for your comment.
Regards... Barry Sharp

I did a trick with IFS=/ for a long time, starting back with some scripts that I wrote originally for SunOS in '95 that then needed to work in HPUX, AIX, and IRIX as well soon after: Here is an example that I just came-up with from foggy memory:
/bin/sh -c 'progname() {
eval progname=$$#
}
IFS=/
progname $0
IFS='
'
echo '$progname' /foo/bar/baz
baz
It worked great. The trick is that eval does not spawn a subshell. A generic 'setter' routine can be written using the same tricks. You might think that you can use set instead of a function, but be wary of dashes. As a side benefit, it prevented people setting IFS breaking my broken shell scripts.

Mac Os Mojave

Archbell Mac Os X

thanks to you both for pointing out these subtleties.