@@ -70,7 +70,7 @@ stages:
70
70
Your program will be executed like this:
71
71
72
72
```bash
73
- $ echo "apple" | ./your_program.sh -E "a"
73
+ $ echo -n "apple" | ./your_program.sh -E "a"
74
74
```
75
75
76
76
The `-E` flag instructs `grep` to interprets patterns as extended regular expressions (with support
@@ -102,7 +102,7 @@ stages:
102
102
Your program will be executed like this:
103
103
104
104
```bash
105
- $ echo "apple123" | ./your_program.sh -E "\d"
105
+ $ echo -n "apple123" | ./your_program.sh -E "\d"
106
106
```
107
107
108
108
You program must exit with 0 if a digit is found in the string, and 1 if not.
@@ -134,7 +134,7 @@ stages:
134
134
Your program will be executed like this:
135
135
136
136
```bash
137
- $ echo "alpha-num3ric" | ./your_program.sh -E "\w"
137
+ $ echo -n "alpha-num3ric" | ./your_program.sh -E "\w"
138
138
```
139
139
140
140
You program must exit with 0 if an alphanumeric character is found in the string, and 1 if not.
@@ -165,7 +165,7 @@ stages:
165
165
Your program will be executed like this:
166
166
167
167
```bash
168
- $ echo "apple" | ./your_program.sh -E "[abc]"
168
+ $ echo -n "apple" | ./your_program.sh -E "[abc]"
169
169
```
170
170
171
171
You program must exit with 0 if an any of the characters are found in the string, and 1 if not.
@@ -195,7 +195,7 @@ stages:
195
195
Your program will be executed like this:
196
196
197
197
```bash
198
- $ echo "apple" | ./your_program.sh -E "[^abc]"
198
+ $ echo -n "apple" | ./your_program.sh -E "[^abc]"
199
199
```
200
200
201
201
You program must exit with 0 if the input contains characters that aren't part of the negative character group, and 1 if not.
@@ -235,7 +235,7 @@ stages:
235
235
Your program will be executed like this:
236
236
237
237
```bash
238
- $ echo "1 apple" | ./your_program.sh -E "\d apple"
238
+ $ echo -n "1 apple" | ./your_program.sh -E "\d apple"
239
239
```
240
240
241
241
You program must exit with 0 if the pattern matches the input, and 1 if not.
@@ -268,7 +268,7 @@ stages:
268
268
Your program will be executed like this:
269
269
270
270
```bash
271
- $ echo "log" | ./your_program.sh -E "^log"
271
+ $ echo -n "log" | ./your_program.sh -E "^log"
272
272
```
273
273
274
274
You program must exit with 0 if the input starts with the given pattern, and 1 if not.
@@ -298,7 +298,7 @@ stages:
298
298
Your program will be executed like this:
299
299
300
300
```bash
301
- $ echo "dog" | ./your_program.sh -E "dog$"
301
+ $ echo -n "dog" | ./your_program.sh -E "dog$"
302
302
```
303
303
304
304
You program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -326,7 +326,7 @@ stages:
326
326
Your program will be executed like this:
327
327
328
328
```bash
329
- $ echo "caats" | ./your_program.sh -E "ca+ts"
329
+ $ echo -n "caats" | ./your_program.sh -E "ca+ts"
330
330
```
331
331
332
332
You program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -352,7 +352,7 @@ stages:
352
352
Your program will be executed like this:
353
353
354
354
```bash
355
- $ echo "dogs" | ./your_program.sh -E "dogs?"
355
+ $ echo -n "dogs" | ./your_program.sh -E "dogs?"
356
356
```
357
357
358
358
You program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -378,7 +378,7 @@ stages:
378
378
Your program will be executed like this:
379
379
380
380
```bash
381
- $ echo "dog" | ./your_program.sh -E "d.g"
381
+ $ echo -n "dog" | ./your_program.sh -E "d.g"
382
382
```
383
383
384
384
You program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -404,7 +404,7 @@ stages:
404
404
Your program will be executed like this:
405
405
406
406
```bash
407
- $ echo "cat" | ./your_program.sh -E "(cat|dog)"
407
+ $ echo -n "cat" | ./your_program.sh -E "(cat|dog)"
408
408
```
409
409
410
410
You program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -439,7 +439,7 @@ stages:
439
439
Your program will be executed like this:
440
440
441
441
```
442
- $ echo "<input>" | ./your_program.sh -E "<pattern>"
442
+ $ echo -n "<input>" | ./your_program.sh -E "<pattern>"
443
443
```
444
444
445
445
Your program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -464,7 +464,7 @@ stages:
464
464
Your program will be executed like this:
465
465
466
466
```
467
- $ echo "<input>" | ./your_program.sh -E "<pattern>"
467
+ $ echo -n "<input>" | ./your_program.sh -E "<pattern>"
468
468
```
469
469
470
470
Your program must exit with 0 if the input matches the given pattern, and 1 if not.
@@ -485,7 +485,7 @@ stages:
485
485
Your program will be executed like this:
486
486
487
487
```
488
- $ echo "<input>" | ./your_program.sh -E "<pattern>"
488
+ $ echo -n "<input>" | ./your_program.sh -E "<pattern>"
489
489
```
490
490
491
491
Your program must exit with 0 if the input matches the given pattern, and 1 if not.
0 commit comments