"sudo" asks for a password. However, if you're "sudo"ing in a script then it's a problem: you wouldn't want to reveal your password as a text.
You can work around so that "sudo" doesn't require a password:
Edit "/etc/sudoers":ALL=(ALL) NOPASSWD: ALL
* NOTE:
- echo 1 > drop_caches : just to free "pagecache" (memory which is used to cache the user data pages)
- echo 2 > drop_caches: just to free dcache (which stores recently generated dentries which are created when a pathname is resolved) and inodes (which contain metadata for files).
- echo 3 > drop_caches: remove all caches