[OpenBIOS] [PATCH v3] Add revision number to banner

Segher Boessenkool segher at kernel.crashing.org
Thu Dec 3 02:28:53 CET 2015

On Wed, Dec 02, 2015 at 07:39:50PM -0500, Programmingkid wrote:
> > OK, I have no strong opinion on this but I don't think cut is very portable, sed is much more common. But here's anoter version similar to your cut way just using the shell only if you like:
> > 
> > REVISION="$(git svn log --oneline -1)" && REVISION="${REVISION%% *}" && REVISION="${REVISION#r}" && echo $REVISION
> This looks like bash only scripting. I seem to remember Mark not liking the idea of having to use a certain shell. Thank you for this information.

"cut" is POSIX.  "%%" and "#" are POSIX.

Of course, what you all should be using is
svn info | grep 'Last Changed Rev' | awk '{ print $4; }'



More information about the OpenBIOS mailing list