I am trying to make a bash script to clear my RAM caches.

**Here's what I have so far:**

```
#! /bin/bash

free -m
sync
sudo -s
echo 3 > /proc/sys/vm/drop_caches

```

But it doesn't fully work. The first three commands work perfectly, at the fourth command it exits.

Please explain.