---
# System prepended metadata

title: Untitled

---

`xargs`

```shell
$ ps -aux | grep php | awk  '{print $2}' | xargs kill
$ grep -P '\w+@\w+' somefile.txt | wc -l
$ some_process 2>&1
```

```sql=
SELECT count(l.user_id) FROM 
     log l,
     (
         SELECT user_id, count(DISTINCT DATE(date_time)) as days 
         FROM log 
         WHERE DATE_ADD(date_time, INTERVAL 1 MONTH) > NOW() 
         GROUP BY user_id 
         HAVING days >= 3
     ) as uws
WHERE l.user_id=uws.user_id AND DATE_ADD(l.date_time, INTERVAL 1 DAY) > NOW()
```