teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

実行例追記

2019/09/12 13:31

投稿

Y.H.
Y.H.

スコア7918

answer CHANGED
@@ -1,2 +1,32 @@
1
1
  `idea.`は行末には無いですね。`idea.\`が行末です。
2
- よって`grep 'idea.\$' zen.txt` でコマンド実行してください。
2
+ よって`grep 'idea.\$' zen.txt` でコマンド実行してください。
3
+
4
+ ```text
5
+ $ cat zen.txt
6
+ The Zen of Python, by Tim Peters
7
+
8
+ Beautiful is better than ugly.
9
+ Explicit is better than implicit.
10
+ Simple is better than complex.
11
+ Complex is better than complicated.
12
+ Flat is better than nested.
13
+ Sparse is better than dense.
14
+ Readability counts.
15
+ Special cases aren't special enough to break the rules.
16
+ Although practicality beats purity.
17
+ Errors should never pass silently.
18
+ Unless explicitly silenced.
19
+ In the face of ambiguity, refuse the temptation to guess.
20
+ There should be one-- and preferably only one --obvious way to do it.
21
+ Although that way may not be obvious at first unless you're Dutch.
22
+ Now is better than never.
23
+ Although never is often better than *right* now.
24
+ If the implementation is hard to explain, it's a bad idea.\
25
+ If the implementation is easy to explain, it may be a good idea.\
26
+ Namespaces are one honking great idea -- let's do more of those!
27
+
28
+ $ grep 'idea.\$' zen.txt
29
+ If the implementation is hard to explain, it's a bad idea.\
30
+ If the implementation is easy to explain, it may be a good idea.\
31
+
32
+ ```