Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-1360: update echo commands in your_program.sh to use -n flag #91

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions course-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "apple" | ./your_program.sh -E "a"
$ echo -n "apple" | ./your_program.sh -E "a"
```

The `-E` flag instructs `grep` to interprets patterns as extended regular expressions (with support
Expand Down Expand Up @@ -102,7 +102,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "apple123" | ./your_program.sh -E "\d"
$ echo -n "apple123" | ./your_program.sh -E "\d"
```

You program must exit with 0 if a digit is found in the string, and 1 if not.
Expand Down Expand Up @@ -134,7 +134,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "alpha-num3ric" | ./your_program.sh -E "\w"
$ echo -n "alpha-num3ric" | ./your_program.sh -E "\w"
```

You program must exit with 0 if an alphanumeric character is found in the string, and 1 if not.
Expand Down Expand Up @@ -165,7 +165,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "apple" | ./your_program.sh -E "[abc]"
$ echo -n "apple" | ./your_program.sh -E "[abc]"
```

You program must exit with 0 if an any of the characters are found in the string, and 1 if not.
Expand Down Expand Up @@ -195,7 +195,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "apple" | ./your_program.sh -E "[^abc]"
$ echo -n "apple" | ./your_program.sh -E "[^abc]"
```

You program must exit with 0 if the input contains characters that aren't part of the negative character group, and 1 if not.
Expand Down Expand Up @@ -235,7 +235,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "1 apple" | ./your_program.sh -E "\d apple"
$ echo -n "1 apple" | ./your_program.sh -E "\d apple"
```

You program must exit with 0 if the pattern matches the input, and 1 if not.
Expand Down Expand Up @@ -268,7 +268,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "log" | ./your_program.sh -E "^log"
$ echo -n "log" | ./your_program.sh -E "^log"
```

You program must exit with 0 if the input starts with the given pattern, and 1 if not.
Expand Down Expand Up @@ -298,7 +298,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "dog" | ./your_program.sh -E "dog$"
$ echo -n "dog" | ./your_program.sh -E "dog$"
```

You program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand Down Expand Up @@ -326,7 +326,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "caats" | ./your_program.sh -E "ca+ts"
$ echo -n "caats" | ./your_program.sh -E "ca+ts"
```

You program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand All @@ -352,7 +352,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "dogs" | ./your_program.sh -E "dogs?"
$ echo -n "dogs" | ./your_program.sh -E "dogs?"
```

You program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand All @@ -378,7 +378,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "dog" | ./your_program.sh -E "d.g"
$ echo -n "dog" | ./your_program.sh -E "d.g"
```

You program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand All @@ -404,7 +404,7 @@ stages:
Your program will be executed like this:

```bash
$ echo "cat" | ./your_program.sh -E "(cat|dog)"
$ echo -n "cat" | ./your_program.sh -E "(cat|dog)"
```

You program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand Down Expand Up @@ -439,7 +439,7 @@ stages:
Your program will be executed like this:

```
$ echo "<input>" | ./your_program.sh -E "<pattern>"
$ echo -n "<input>" | ./your_program.sh -E "<pattern>"
```

Your program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand All @@ -464,7 +464,7 @@ stages:
Your program will be executed like this:

```
$ echo "<input>" | ./your_program.sh -E "<pattern>"
$ echo -n "<input>" | ./your_program.sh -E "<pattern>"
```

Your program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand All @@ -485,7 +485,7 @@ stages:
Your program will be executed like this:

```
$ echo "<input>" | ./your_program.sh -E "<pattern>"
$ echo -n "<input>" | ./your_program.sh -E "<pattern>"
```

Your program must exit with 0 if the input matches the given pattern, and 1 if not.
Expand Down
Loading