Skip to content

Commit

Permalink
update your_program.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Jul 19, 2024
1 parent 98dcce8 commit 877ad80
Show file tree
Hide file tree
Showing 30 changed files with 45 additions and 46 deletions.
2 changes: 1 addition & 1 deletion compiled_starters/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `cmake` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/Server.cpp`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `dotnet (8.0)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/Program.cs`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/gleam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `gleam (1.0)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/grep.gleam`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `go (1.19)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`cmd/mygrep/main.go`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/go/cmd/mygrep/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"unicode/utf8"
)

// Usage: echo <input_text> | your_grep.sh -E <pattern>
// Usage: echo <input_text> | your_program.sh -E <pattern>
func main() {
if len(os.Args) < 3 || os.Args[1] != "-E" {
fmt.Fprintf(os.Stderr, "usage: mygrep -E <pattern>\n")
Expand Down
2 changes: 1 addition & 1 deletion compiled_starters/haskell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `stack` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/Main.hs`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `node (21)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.js`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `python (3.11)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.py`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `ruby (3.3)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.rb`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion compiled_starters/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `cargo (1.62)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/main.rs`. This command compiles your Rust project, so it might be slow
the first time you run it. Subsequent runs will be fast.
1. Commit your changes and run `git push origin master` to submit your solution
Expand Down
2 changes: 1 addition & 1 deletion compiled_starters/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn match_pattern(input_line: &str, pattern: &str) -> bool {
}
}

// Usage: echo <input_text> | your_grep.sh -E <pattern>
// Usage: echo <input_text> | your_program.sh -E <pattern>
fn main() {
// You can use print statements as follows for debugging, they'll be visible when running tests.
println!("Logs from your program will appear here!");
Expand Down
2 changes: 1 addition & 1 deletion compiled_starters/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `bun (1.1)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.ts`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
31 changes: 15 additions & 16 deletions course-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "apple" | ./your_grep.sh -E "a"
$ echo "apple" | ./your_program.sh -E "a"
```
The `-E` flag instructs `grep` to interprets patterns as extended regular expressions (with support
Expand Down Expand Up @@ -105,7 +105,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "apple123" | ./your_grep.sh -E "\d"
$ echo "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 @@ -137,7 +137,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "alpha-num3ric" | ./your_grep.sh -E "\w"
$ echo "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 @@ -168,7 +168,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "apple" | ./your_grep.sh -E "[abc]"
$ echo "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 @@ -198,7 +198,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "apple" | ./your_grep.sh -E "[^abc]"
$ echo "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 @@ -238,7 +238,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "1 apple" | ./your_grep.sh -E "\d apple"
$ echo "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 @@ -271,7 +271,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "log" | ./your_grep.sh -E "^log"
$ echo "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 @@ -301,7 +301,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "dog" | ./your_grep.sh -E "dog$"
$ echo "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 @@ -329,7 +329,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "caats" | ./your_grep.sh -E "ca+ts"
$ echo "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 @@ -355,7 +355,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "dogs" | ./your_grep.sh -E "dogs?"
$ echo "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 @@ -381,7 +381,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "dog" | ./your_grep.sh -E "d.g"
$ echo "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 @@ -407,7 +407,7 @@ stages:
Your program will be executed like this:
```bash
$ echo "cat" | ./your_grep.sh -E "(cat|dog)"
$ echo "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 @@ -442,7 +442,7 @@ stages:
Your program will be executed like this:
```
$ echo "<input>" | ./your_grep.sh -E "<pattern>"
$ echo "<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 @@ -467,7 +467,7 @@ stages:
Your program will be executed like this:
```
$ echo "<input>" | ./your_grep.sh -E "<pattern>"
$ echo "<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 @@ -488,7 +488,7 @@ stages:
Your program will be executed like this:
```
$ echo "<input>" | ./your_grep.sh -E "<pattern>"
$ echo "<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 @@ -497,4 +497,3 @@ stages:
**Example:**
- `('(cat) and \2') is the same as \1` should match "'cat and cat' is the same as 'cat and cat'".
2 changes: 1 addition & 1 deletion solutions/cpp/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `cmake` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/Server.cpp`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/csharp/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `dotnet (8.0)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/Program.cs`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/gleam/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `gleam (1.0)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/grep.gleam`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/go/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `go (1.19)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`cmd/mygrep/main.go`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/go/01-cq2/code/cmd/mygrep/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"unicode/utf8"
)

// Usage: echo <input_text> | your_grep.sh -E <pattern>
// Usage: echo <input_text> | your_program.sh -E <pattern>
func main() {
if len(os.Args) < 3 || os.Args[1] != "-E" {
fmt.Fprintf(os.Stderr, "usage: mygrep -E <pattern>\n")
Expand Down
2 changes: 1 addition & 1 deletion solutions/go/01-cq2/diff/cmd/mygrep/main.go.diff
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"unicode/utf8"
)

// Usage: echo <input_text> | your_grep.sh -E <pattern>
// Usage: echo <input_text> | your_program.sh -E <pattern>
func main() {
if len(os.Args) < 3 || os.Args[1] != "-E" {
fmt.Fprintf(os.Stderr, "usage: mygrep -E <pattern>\n")
Expand Down
2 changes: 1 addition & 1 deletion solutions/haskell/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `stack` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/Main.hs`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/javascript/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `node (21)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.js`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/python/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `python (3.11)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.py`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/ruby/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `ruby (3.3)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.rb`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
2 changes: 1 addition & 1 deletion solutions/rust/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `cargo (1.62)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`src/main.rs`. This command compiles your Rust project, so it might be slow
the first time you run it. Subsequent runs will be fast.
1. Commit your changes and run `git push origin master` to submit your solution
Expand Down
2 changes: 1 addition & 1 deletion solutions/rust/01-cq2/code/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn match_pattern(input_line: &str, pattern: &str) -> bool {
}
}

// Usage: echo <input_text> | your_grep.sh -E <pattern>
// Usage: echo <input_text> | your_program.sh -E <pattern>
fn main() {
if env::args().nth(1).unwrap() != "-E" {
println!("Expected first argument to be '-E'");
Expand Down
2 changes: 1 addition & 1 deletion solutions/rust/01-cq2/diff/src/main.rs.diff
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
}

// Usage: echo <input_text> | your_grep.sh -E <pattern>
// Usage: echo <input_text> | your_program.sh -E <pattern>
fn main() {
- // You can use print statements as follows for debugging, they'll be visible when running tests.
- println!("Logs from your program will appear here!");
Expand Down
2 changes: 1 addition & 1 deletion solutions/typescript/01-cq2/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `bun (1.1)` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.ts`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
4 changes: 2 additions & 2 deletions starter_templates/all/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parsers/lexers work, and how regular expressions are evaluated.
The entry point for your `grep` implementation is in `{{ user_editable_file }}`. Study and uncomment the relevant code, and
push your changes to pass the first stage:

``` sh
```sh
git add .
git commit -m "pass 1st stage" # any msg
git push origin master
Expand All @@ -30,7 +30,7 @@ Time to move on to the next stage!
Note: This section is for stages 2 and beyond.

1. Ensure you have `{{ required_executable }}` installed locally
1. Run `./your_grep.sh` to run your program, which is implemented in
1. Run `./your_program.sh` to run your program, which is implemented in
`{{ user_editable_file }}`.{{# language_is_rust }} This command compiles your
Rust project, so it might be slow the first time you run it. Subsequent runs
will be fast.{{/ language_is_rust}}
Expand Down
Loading

0 comments on commit 877ad80

Please sign in to comment.