docs: rename exec -> execute (#13514)

pull/13530/head
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
1 changed files with 10 additions and 1 deletions

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