The last positional parameter in bash
Found a way to do this in a single line. Works nicely.
eval "last=\\${$#}"
Brian Pontarelli
Archive for November 2007
Found a way to do this in a single line. Works nicely.
eval "last=\\${$#}"
Having just finished a conversation with a co-worker, I’ve started noticing that software engineers tend to exaggerate situations quite a bit. I’ve done it. If you are a software engineer, I’m sure you’ve done it. It goes something like this:
“That thing was so messed up I had to rewrite the entire thing.”
“That library is lacking so many features its gonna take weeks to finish it.”
“I spent hours tracking down an enormous bug in you code.”
Usually, reality is really something like this:
“I had to refactor a class or two to add my feature. It took a while to learn the code, but only a little while to code it.”
“If we add 3-5 more things, that library will be much more useful, but they are just nice to have.”
“I spent an hour or so learning your code because I had to fix a bug. Next time I’m sure it won’t take as long since I know the code much better now.”
More often than not, the solution is relatively simple and when it isn’t, I’ve found more often than not, the solution is being over-engineered. It seems to me that this is a systemic problem that occurs in software engineering because of a number of reasons:
My solution, try to reason with the offending engineer and after two shots, give up. It’s not worth the aggravation and usually you’ll have to do the work in the end anyways, so just save your energy for doing the work.
No dist upgrade. On Ubuntu (debian):
update-manager -c
On all the rest:
want the latest and greatest? Good luck dude!