1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: rename exec -> execute (#13514)

This commit is contained in:
eyun 2022-02-19 21:20:46 +08:00 committed by GitHub
parent 0236931c78
commit 2b974cdb97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5695,10 +5695,19 @@ rmdir_all('build') or { }
mkdir('build') ?
// Move *.v files to build/
result := exec('mv *.v build/') ?
result := execute('mv *.v build/') ?
if result.exit_code != 0 {
println(result.output)
}
// print command then execute it
fn sh(cmd string){
println(" $cmd")
print(execute_or_exit(cmd).output)
}
sh('ls')
// Similar to:
// files := ls('.') ?
// mut count := 0