8000 GitHub - mrdamos69/SimpleBashUtils
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mrdamos69/SimpleBashUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Bash Utils

Development of Bash text utilities: cat, grep.

cat Usage

cat [OPTION] [FILE]...

cat Options

No. Options Description
1 -b (GNU: --number-nonblank) numbers only non-empty lines
2 -e implies -v (GNU only: -E the same, but without implying -v) but also display end-of-line characters as $
3 -n (GNU: --number) number all output lines
4 -s (GNU: --squeeze-blank) squeeze multiple adjacent blank lines
5 -t implies -v (GNU: -T the same, but without implying -v) but also display tabs as ^I

grep Usage

grep [options] template [file_name]

grep Options

No. Options Description
1 -e pattern
2 -i Ignore uppercase vs. lowercase.
3 -v Invert match.
4 -c Output count of matching lines only.
5 -l Output matching files only.
6 -n Precede each matching line with a line number.
7 -h Output matching lines without preceding them by file names.
8 -s Suppress error messages about nonexistent or unreadable files.
9 -f file Take regexes from a file.
10 -o Output the matched parts of a matching line.

Working with the cat utility

You need to develop a cat utility:

  • Support of all flags (including GNU versions) specified above
  • The source, header, and build files must be placed in the src/cat/ directory
  • The resulting executable file must be placed in the directory src/cat/ and named s21_cat

Working with grep utility

You need to develop the grep utility:

  • Support of the following flags: -e, -i, -v, -c, -l, -n
  • Only pcre or regex libraries can be used for regular expressions
  • The source, header and make files must be placed in the src/grep/ directory
  • The resulting executable file must be placed in the directory src/grep/ and named s21_grep

Implementation of some grep utility flags

Bonus assignment for extra points. You need to develop the grep utility:

  • Support of all flags, including: -h, -s, -f, -o
  • Only pcre or regex libraries can be used for regular expressions
  • The source, header and make files must be placed in the src/grep/ directory
  • The resulting executable file must be placed in the directory src/grep/ and named s21_grep

Implementation of grep utility flag combinations

Bonus assignment for extra points. You need to develop the grep utility:

  • Support of all flags, including their pair combinations (e.g. -iv, -in)
  • Only pcre or regex libraries can be used for regular expressions
  • The source, header and make files must be placed in the src/grep/ directory
  • The resulting executable file must be placed in the directory src/grep/ and named s21_grep

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0