Programmer's Blog

Programmer's reference

[Shell] Find bin path using env

In the previous example of using expect the bin file is specified using the following syntax

#!/usr/bin/expect

If the path to expect is not found, try

#!/usr/bin/env expect

This will cause the execution to search for the excutable

Leave a comment