Skip to content

Commit

Permalink
Add an example of yaegi in a shebang line
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenDowideit authored and traefiker committed Jan 15, 2020
1 parent 6d90c5a commit b057ada
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ $ yaegi cmd/yaegi/yaegi.go
>
```

Or for Go scripting in the shebang line:

```console
$ cat /tmp/test
#!/usr/bin/env yaegi
package main

import "fmt"

func main() {
fmt.Println("test")
}
$ ls -la /tmp/test
-rwxr-xr-x 1 dow184 dow184 93 Jan 6 13:38 /tmp/test
$ /tmp/test
test
```

## Documentation

Documentation about Yaegi commands and libraries can be found at usual [godoc.org][docs].
Expand Down

0 comments on commit b057ada

Please sign in to comment.