pemrograman, Tutorial

What does “if [ $? -eq 0 ]” mean?

Have you ever found this?

cat version.log |egrep "8.1|9.2|9.0"|grep -v grep >/dev/null
if [ $? -eq 0 ]

What is this “$? -eq 0” condition?

Here: ($?) is a return value of previous command. (-eq) means equal. As you might guessed it. And (0) is a success or found.

Conclusion: if the return value of previous command is success or the particular string was found. Usually it followed by: then blablabla..

PS: You can find more information about Shell Command Language here.

Belajar, pemrograman, Tips

What You Should Know About Programming

Coding is fun. It is like playing games and of course (like other games) there are goals. Since coding is easy, I think everyone can code. Me, you, your children, and the others. But, before you decided to learn to code you might want to know ‘what is programming? what is it look like? what I should know about it?’

Yes, there are many things about programming you should know (you’ll know more later on). But, as a start these seven things may help you with that questions.

Oh, in case you need programming resources, here they are.

Belajar, How to, pemrograman, Tips

[How To] Teach Yourself to Code

You may have seen this post, Complete Computer Programming Resources, and found out some insights as well as inspirations. Now, I am telling you that those resources will be useless unless you teach yourself to code.

Fortunately, Nate Westheimer, the co-founder and VP product for shares his introductions for computer programming –which I think it’s a very good introduction.

Nate calls it ‘Hope Manifesto,’ breaking down how he learned basic coding principles in one week. He says HOPE stands for Hacking-cOding Product Executive.

Enjoy your code adventure!

Image credit: