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

Coreutils-Mohamed Fadel #278

Open
10 tasks done
MohamedFadel01 opened this issue Sep 2, 2024 · 0 comments · May be fixed by codescalersinternships/Coreutils-MohamedFadel#2
Open
10 tasks done

Coreutils-Mohamed Fadel #278

MohamedFadel01 opened this issue Sep 2, 2024 · 0 comments · May be fixed by codescalersinternships/Coreutils-MohamedFadel#2

Comments

@MohamedFadel01
Copy link
Member

MohamedFadel01 commented Sep 2, 2024

CoreUtils in Go

Description

Goal is to reimplement several core Unix utilities. giving exposure to Go basics, including file I/O, flag parsing, string manipulation, and more.

Requirements

  1. Create Go programs that replicate the functionality of the following Unix utilities:
  • head
  • tail
  • wc (word count)
  • cat
  • echo
  • tree
  • env
  • yes
  • true
  • false
  1. Each utility should be implemented as a separate Go program.
  2. Programs should read input from files or stdin as appropriate.
  3. Implement basic flags for each utility where applicable.

Example Implementations

1. head

  • Print the first 10 lines of input by default.
  • Add a -n flag to specify the number of lines to print.

2. tail

  • Print the last 10 lines of input by default.
  • Add a -n flag to specify the number of lines to print.

3. wc (word count)

  • Count lines, words, and characters in the input.
  • Add -l, -w, and -c flags to display only lines, words, or characters respectively.

4. cat

  • Concatenate and print files.
  • Add a -n flag to number output lines.

5. echo

  • Print arguments to standard output.
  • Add a -n flag to omit the trailing newline.

Acceptance Criteria

  • Each utility is implemented as a separate Go program.
  • Includes basic error handling.
  • Includes a README with build and usage instructions for all utilities.

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant