From 126e0bbc375c0258fd513b4eae0f41df11bb85d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=81=A3?= <⁣> Date: Sun, 17 May 2020 17:59:16 +0200 Subject: [PATCH] Remove useless files, update subject --- go/tofix/cat/correct/quest8.txt | 1 - go/tofix/cat/correct/quest8T.txt | 1 - subjects/cat.en.md | 28 ++++++++++------------------ 3 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 go/tofix/cat/correct/quest8.txt delete mode 100644 go/tofix/cat/correct/quest8T.txt diff --git a/go/tofix/cat/correct/quest8.txt b/go/tofix/cat/correct/quest8.txt deleted file mode 100644 index 0eaa1354e..000000000 --- a/go/tofix/cat/correct/quest8.txt +++ /dev/null @@ -1 +0,0 @@ -"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing diff --git a/go/tofix/cat/correct/quest8T.txt b/go/tofix/cat/correct/quest8T.txt deleted file mode 100644 index 2ec173c67..000000000 --- a/go/tofix/cat/correct/quest8T.txt +++ /dev/null @@ -1 +0,0 @@ -"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence." diff --git a/subjects/cat.en.md b/subjects/cat.en.md index bb9b18c1e..6b7d05bd2 100644 --- a/subjects/cat.en.md +++ b/subjects/cat.en.md @@ -2,32 +2,24 @@ ### Instructions -Write a program that has the same behaviour as the system's `cat` command-line. +Write a program that behaves like a simplified `cat` command. -- The `options` do not have to be handled. +- The options do not have to be handled. -- If the program is called without arguments it should take the `input` and print it back (as shown with the "Hello" example below). - -- In the program folder create two files named `quest8.txt` and `quest8T.txt`. - -- Copy to the `quest8.txt` file the following sentence : - -`"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing` - -- Copy to the `quest8T.txt` file the following sentence : - -`"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."` - -- In case of error the program should print the error. - -- The program must be submitted inside a folder named `cat`. +- If the program is called without arguments it should take the standard input (stdin) and print it back (as shown with the "Hello" example below). ```console +student@ubuntu:~/[[ROOT]]/cat$ echo '"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing' > quest8.txt +student@ubuntu:~/[[ROOT]]/cat$ cat < quest8T.txt +"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence." +EOF student@ubuntu:~/[[ROOT]]/cat$ go build student@ubuntu:~/[[ROOT]]/cat$ ./cat abc -open abc: no such file or directory +ERROR: abc: No such file or directory student@ubuntu:~/[[ROOT]]/cat$ ./cat quest8.txt "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing +student@ubuntu:~/[[ROOT]]/cat$ cat quest8.txt | ./cat +"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing student@ubuntu:~/[[ROOT]]/cat$ ./cat Hello Hello