-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
V for Bash script developers
Delyan Angelov edited this page Nov 5, 2019
·
10 revisions
V can be used as a platform independent script like language too.
All you have to do, is save your file with a .vsh extension.
By doing it, v will make functions inside the os module automatically available to your scripts, without you having to import them manually.
You also will not need to specify a main function (that is a work in progress, for now please do so ... simple linear examples work, but for now it is more stable with a fn main(){}
).
Hello World | |
#!/usr/bin/env bash echo "Hello world" |
println('Hello World!') |
Listing files in current folder | |
#!/usr/bin/env bash ls |
files := ls('.') or { panic(err) } println( files) |