Question: I want awk to print the line if the first two characters in field 7 are "R ".
I tried this command and it didn't work:

```
cat file.txt | awk -F, '{if($7=="R *") print $0}'

```

Can anyone help me with this?

Answer: 
Use the tilde sign and Regular Expressions (words that start with the letter 'R' and second is space)

```
cat file.txt | awk -F, '{if ($7 ~ /^R /) print $0;}'

```
```
awk -F, '$7 ~ /^[ \t]*R /' file.txt

```

Assuming data are comma separated.