From 95691f5fa13768388b01c24b63668d05bd0c5f27 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Tue, 22 Oct 2019 22:46:13 +0100 Subject: [PATCH] typos and placeholdder for fr version --- subjects/flags.en.md | 49 ++++++++++++++++++++++++++++++++++++++++++++ subjects/flags.fr.md | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 subjects/flags.en.md create mode 100644 subjects/flags.fr.md diff --git a/subjects/flags.en.md b/subjects/flags.en.md new file mode 100644 index 000000000..4e7d77c4d --- /dev/null +++ b/subjects/flags.en.md @@ -0,0 +1,49 @@ +## flags + +### Instructions + +Write a **program** that can have as arguments `--insert` (or `-i`), `--order` (or `-o`) and a `string`. + +This program should : + +- Insert the string given to the `--insert` (or `-i`), in the `string` argument, if given. +- Order the `string` argument if given the flag `--order` (or `-o`). +- In case there are no arguments or the flag `--help` (or `-h`) is given, it should print the options, as shown in the example. + +Example of output : + +```console +student@ubuntu:~/piscine-go/flags$ go build +student@ubuntu:~/piscine-go/flags$ ./flags --insert=4321 --order asdad +1234aadds +student@ubuntu:~/piscine-go/flags$ ./flags --insert=4321 asdad +asdad4321 +student@ubuntu:~/piscine-go/flags$ ./flags asdad +asdad +student@ubuntu:~/piscine-go/flags$ ./flags --order 43a21 +1234a +student@ubuntu:~/piscine-go/flags$ ./flags +--insert + -i + This flag inserts the string into the string passed as argument. +--order + -o + This flag will behave like a boolean, if its called it will order the argument. +student@ubuntu:~/piscine-go/flags$ +student@ubuntu:~/piscine-go/flags$ ./flags -h +--insert + -i + This flag inserts the string into the string passed as argument. +--order + -o + This flag will behave like a boolean, if its called it will order the argument. +student@ubuntu:~/piscine-go/flags$ +student@ubuntu:~/piscine-go/flags$ ./flags --help +--insert + -i + This flag inserts the string into the string passed as argument. +--order + -o + This flag will behave like a boolean, if its called it will order the argument. +student@ubuntu:~/piscine-go/flags$ +``` diff --git a/subjects/flags.fr.md b/subjects/flags.fr.md new file mode 100644 index 000000000..4e7d77c4d --- /dev/null +++ b/subjects/flags.fr.md @@ -0,0 +1,49 @@ +## flags + +### Instructions + +Write a **program** that can have as arguments `--insert` (or `-i`), `--order` (or `-o`) and a `string`. + +This program should : + +- Insert the string given to the `--insert` (or `-i`), in the `string` argument, if given. +- Order the `string` argument if given the flag `--order` (or `-o`). +- In case there are no arguments or the flag `--help` (or `-h`) is given, it should print the options, as shown in the example. + +Example of output : + +```console +student@ubuntu:~/piscine-go/flags$ go build +student@ubuntu:~/piscine-go/flags$ ./flags --insert=4321 --order asdad +1234aadds +student@ubuntu:~/piscine-go/flags$ ./flags --insert=4321 asdad +asdad4321 +student@ubuntu:~/piscine-go/flags$ ./flags asdad +asdad +student@ubuntu:~/piscine-go/flags$ ./flags --order 43a21 +1234a +student@ubuntu:~/piscine-go/flags$ ./flags +--insert + -i + This flag inserts the string into the string passed as argument. +--order + -o + This flag will behave like a boolean, if its called it will order the argument. +student@ubuntu:~/piscine-go/flags$ +student@ubuntu:~/piscine-go/flags$ ./flags -h +--insert + -i + This flag inserts the string into the string passed as argument. +--order + -o + This flag will behave like a boolean, if its called it will order the argument. +student@ubuntu:~/piscine-go/flags$ +student@ubuntu:~/piscine-go/flags$ ./flags --help +--insert + -i + This flag inserts the string into the string passed as argument. +--order + -o + This flag will behave like a boolean, if its called it will order the argument. +student@ubuntu:~/piscine-go/flags$ +```