Chaining commands helps with scripting. Closely related with chaining is pipes and redirects.
$ ls; sleep 5; lsExample
List running processes matching “smbd” filtering out “grep”, filter for PID field, and terminate each process
$ ps aux | grep smbd | grep -v grep | awk '{ print $2 }' | kill -9