Skip to content

This is a repository for project 1 in CMPS 5143 - Advanced Operating Systems.

Notifications You must be signed in to change notification settings

BrodayWalker/5143-gosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

181 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shell Project

Operating Systems Spring 2020

Group Members

Name Email Github Username
Jeremy Glebe jeremyglebe@gmail.com jeremyglebe
Corbin Matamoros corbinmatamoros@yahoo.com Pirhomega
Broday Walker brodaywalker@gmail.com BrodayWalker

Project Files

Command FileName Author Works
README.md Broday 💯
cat cat.go Corbin 💯
cd cd.go Broday 💯
chmod chmod.go Corbin
cp cp.go Corbin 💯
echo echo.go Broday 💯
exclamation exclamation.go Corbin 💯
gosh.go All 💯
grep grep.go Jeremy 💯
head head.go Broday 💯
history history.go Corbin 💯
less less.go Corbin 💯
ls ls.go Broday 💯
mkdir mkdir.go Broday 💯
mv mv.go Broday 💯
nix_chmod nix_chmod.go Jeremy 💯
nix_mkdir nix_mkdir.go Jeremy 💯
nix_mv nix_mv.go Jeremy 💯
pipe pipe.go Jeremy 💯
pwd pwd.go Broday 💯
redirect redirect.go Jeremy 💯
rm rm.go Broday 💯
sort sort.go Corbin 50%
split split.go Corbin 💯
tail tail.go Broday 💯
touch touch.go Broday 💯
trump trump.go Jeremy 💯
utils.go Broday 💯
wc wc.go Jeremy 💯

Directory Structure

/5143-gosh
├── README.md
├── assets
|   ├── trump
|   ├── trump.wav
├── gosh
│   ├── cat.go
│   ├── cd.go
│   ├── chmod.go
│   ├── cp.go
│   ├── echo.go
│   ├── exclamation.go
│   ├── gosh.go
│   ├── grep.go
│   ├── head.go
│   ├── history.go
│   ├── less.go
│   ├── ls.go
│   ├── mkdir.go
│   ├── mv.go
│   ├── nix_chmod.go
│   ├── nix_mkdir.go
│   ├── nix_mv.go
│   ├── pipe.go
│   ├── pwd.go
│   ├── rm.go
│   ├── sort.go
│   ├── split.go
│   ├── tail.go
│   ├── touch.go
│   ├── trump.go
│   ├── utils.go
│   ├── wc.go

How gosh Works

Currently, the gosh folder contains all .go files. gosh.go contains the main function, which is used to accept instructions and call the appropriate <command>.go file.

Naming Conventions

gosh uses the standard Go naming conventions. Each supported command is contained in an appropriately named .go file. For example, the command mkdir is implemented in the mkdir.go file.
All exported commands should be capitalized and commented appropriately.

Each .go file that contains executable code will have the package main declaration at the top of the file.

Example .go File

package main

import (
	"fmt"
)

// NamePrinter This function prints a name.
func  NamePrinter() {
	name := "Frank Sinatra"
	fmt.Printf("Hello, %s.\n", name)
}

The function NamePrinter will be visible and usable in other .go files in the folder without having to import anything.

Building gosh

If you are building gosh for the first time, download the following prerequisite package using the command line:

go get github.com/buger/goterm

Build gosh from the gosh folder with go build . The result will be an executable called gosh.exe .

Running gosh

Windows: Run gosh with ./gosh.exe

Linux: Run gosh with ./gosh

About

This is a repository for project 1 in CMPS 5143 - Advanced Operating Systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages