Posted By

noah on 11/19/10


Tagged

Shell count add increment tools plus


Versions (?)

increment a counter in bash


 / Published in: Bash
 

URL: http://www.linuxquestions.org/questions/linux-general-1/bash-equivalent-to-c-increment-operator-131504/

Spoof the Hudson BUILD_NUMBER environment variable, which increments on every build.

With this tiny hack you can fake a BUILD_NUMBER that you can increment by hand.

Useful for testing Hudson build scripts.

  1. export BUILD_NUMBER=0
  2.  
  3. ((BUILD_NUMBER++))

Report this snippet  

You need to login to post a comment.