/check-review-go-piscine

A simple shell script for using on reviews at @42Tokyo's Go Piscine.

Primary LanguageShell

Check Review Go Piscine

A simple shell script for using on reviews at @42Tokyo's Go Piscine.

Where to place it

Go-Piscine
|-- check.sh                <---- here
|-- Go[XX]
    |-- ex[XX]
        |-- main.go
        |-- vendor
            |-- ft
                |-- printrune.go
            |-- piscine
                |-- [excercisename].go

Usage

First, give the permissions to execute the file:

chmod u+x check.sh

Source the file to be able to cd into other directories:

source check.sh

Explanation

You should execute the command like this:

sh check.sh ACTION (e.g. see/edit/run) LESSON (e.g. Go00) EXERCISE (e.g. ex00)

Use Example

  • see

Use sh check.sh see 00 01 (to see Go00's ex01 contents using cat/bat)

image

  • edit

Use sh check.sh edit 00 01 (to edit Go00's ex01 using vim)

image image

  • run

Use sh check.sh run 00 01 (to run Go00's ex01)

💡 There is no need of running go mod init exXX because this command already does it automatically for you!

image