codescalersinternships / home

home repo for internships
1 stars 0 forks source link

Coreutils - TypeScript - Rowan #173

Open rowanxgamal opened 6 days ago

rowanxgamal commented 6 days ago

CoreUtils in Typescript

Description

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

Requirements

  1. Create Typscript programs that replicate the functionality of the following Unix utilities:
  1. Each utility should be implemented as a separate Python 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