Question: I have a file:

```
AA BB CC DD
BB CC DD AA 
BB CC DDA AA
CC DD AA BB

```

This command prints the line:

```
$ awk '{if($3=="DD") print}' file
BB CC DD AA

```

I want this condition to write to the array. This command does not work:

```
$ awk '{if($3=="DD") split($0, a, RS); print a[1]}' file

BB CC DD AA 
BB CC DD AA 
BB CC DD AA

```

Thank you for your help.

**EDIT:**

I wanted to write to an array of lines from the pattern 'DD'.

These are good solutions:

```
awk '{if($3=="DD") {split($0, a, RS); print a[1];}}' file
awk '$3=="DD"{split($0, a, RS); print a[1];}' file

```

Thank you for your help.

Answer: 
It's quite easy.

Listen on the UITableViewDataSource call [`tableView:canMoveRowAtIndexPath:`](http://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006941-CH3-SW30)

Like this:

```
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
  if(indexPath.section == 0) {
    return NO;
  }

  return YES;
}

```

If you don't not where to place the method, place it next to `tableView:cellForRowAtIndexPath:`
Set `showsReorderControl` to NO property of cell

```
cell.showsReorderControl = NO;

```

In addition, if the data source implements `tableView:canMoveRowAtIndexPath:` to return NO, the reordering control does not appear in that designated row. You need to check indexPath and return NO for it.