gobyexample/examples/command-line-arguments/command-line-arguments.sh
2019-10-12 20:58:18 +03:00

12 lines
478 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Чтобы поэкспериментировать с аргументами командной
# строки, лучше сначала создать двоичный файл с
# помощью `go build`.
$ go build command-line-arguments.go
$ ./command-line-arguments a b c d
[./command-line-arguments a b c d]
[a b c d]
c
# Далее мы рассмотрим более сложную обработку командной
# строки с флагами.