Question: When retrieving data from Firebase, we typically use the code below (or some reiteration of it)

```
...observeSingleEvent(of: .value, with: { snapshot in

var tempPosts = [PostModel]()

for child in snapshot.chidren{
}

return tempPosts

})

```

but I don't exactly get what this code is doing? Can someone explain it on a high level? I've tried printing data on mulitple spots but the only data I'm getting is: Snap post or [App.PostModel]

Answer: 
Also grep can do that.

```
grep -Ev '^chr(Un|M)' file

```

GNU ed(1)

```
printf '%s\n' 'v/^chr\(Un\|M\)/p' | ed -s file

```
awk:

```
awk '$0!~/^chr(Un|M)/'

```

sed:

```
sed -rne '/^chr(Un|M)/!p'

```

grep:

```
grep -Ev "^chr(Un|M)"

```

bash:

```
for LINE in $(<your_file.txt); do [[ $LINE =~ ^chr(Un|M) ]] || echo $LINE ; done

```

You should use one of the first three option since they are more portable across differente shell.