I have a log that looks like this:

```
2011-12-15 23:37      8920   xxxxxxxxxxxx
2011-12-16 00:06      8979   xxxxxxxxxxxx
2011-12-16 00:40      8757   xxxxxxxxxxxx
2011-12-16 00:43      8795   xxxxxxxxxxxx
2011-12-16 00:43      8795   xxxxxxxxxxxx
2011-12-16 01:17    174050   xxxxxxxxxxxx
2011-12-16 01:19    139883   xxxxxxxxxxxx
2011-12-16 01:34    174129   xxxxxxxxxxxx

```

I need to parse this log, but the only part I care about is "xxxxxxxxxxxx"; "xxxxxxxxxxxx" can be anything but it always has the same character count.

Currently I'm using this to parse my log:

```
VAR=`awk NR==$i log.log | cut -c30-45`

```

But that was assuming that the third column wouldn't change character count, for example "8920", but then as you can see, there were three logs which went past four characters, for example, "174129". Everything but the third column will have the same character count, the fourth column will be different, but the character count won't be. 

I need to get what's in the fourth column, so I was thinking maybe I can get the character position in which "xxxxxxxxxxxx" begins then I can just do `cut -c$STRING_POS-67`. In PHP there is a function called [strpos](http://us.php.net/manual/en/function.strpos.php), this function "returns the numeric position of the first occurrence of needle in the haystack string", this exactly what I need, is there something like this that I can use in bash?

@shellter -------------------------
I needed something really quick, so I just did a lot of googleing and found some bits and pieces and just combined them all together.

```
NUM_LINES=`awk -F, 'END{print NR}' log.log`
while [ $i -le $NUM_LINES ]
do    
    VAR=`awk -v a=$i 'NR==a{print $4}' log.log | cut -c28-58`

    # Do stuff with $VAR

    i=$(( $i + 1 ))

done

```