Skip to content

jmeji011/rshell-2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS 100 - rshell - hw1

Features

  • This is a C++ program that implements a subset of the GNU ls command.
  • supports -l, -a, and -R optional flags
  • and the ability to pass in zero, one, or many files

Folders

"test" and "test1" are for testing. ls.script is in tests folder.

How to use

Run the following commands

$ git clone https://github.com/Renee7547/rshell.git
$ cd rshell
$ git checkout hw1
$ make
$ bin/rshell`

Test cases

They are in rshell/tests

Issues

  1. There are some issues with recursively sorting(-R). I will fix it as soon as possible.
  2. Unlike the real bash, the files are listed ascending from left to right.

Bugs have been solved

  1. Unable to print out "total" for -l: Then I modified the process(), try to deal with it in two cases(-a, and no -a). For those without -a, I just eliminating them from the path list.
  2. Some small bugs: Like segmentation fault, opendir() error, and recognizing file or folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 97.9%
  • Makefile 2.1%