# Increment value

**URL:** <https://www.ruby-forum.com/t/increment-value/194987>\
**Category:** NGINX\
**Created:** [September 15, 2010, 1:28am UTC](https://www.ruby-forum.com/t/increment-value/194987 "2010-09-15T01:28:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/df788c/32.png) [@ivan](https://www.ruby-forum.com/u/ivan)\
**Post date:** [September 15, 2010, 1:28am UTC](https://www.ruby-forum.com/t/increment-value/194987/1 "2010-09-15T01:28:59Z")

</div>

I want to use the following scheme:

/foo

if ( !get key ) {  
create key value 1  
}  
key value++

it’s possible ?

---

<div class="post-metadata">

**Author:** ![ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/df788c/32.png) [@ivan](https://www.ruby-forum.com/u/ivan)\
**Post date:** [September 17, 2010, 9:26am UTC](https://www.ruby-forum.com/t/increment-value/194987/2 "2010-09-17T09:26:33Z")

</div>

On Wed, Sep 15, 2010 at 7:27 AM, Ivan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

Here’s an example in my slides that demonstrates how to achieve this:

```
http://agentzh.org/misc/slides/nginx-conf-scripting/#42

```

Use the arrow keys on your keyboard to switch pages. If you have any  
further questions, please let me know 🙂

Cheers,  
-agentzh
