-1

How do I write a C program that implements the following commands:

tail -5 /etc/passwd | grep e | sort  > result.txt

What should the C program contain? How should r_read and r_write be implemented in the C program?

livibetter
  • 19,832
  • 3
  • 42
  • 42
Abdul Moeed
  • 19
  • 1
  • 4

1 Answers1

0

coreutils are opensource so you can read their sources. Here's a link where you can find sources to coreutils http://git.savannah.gnu.org/cgit/coreutils.git/tree/src

Mateo Hrastnik
  • 533
  • 1
  • 7
  • 20