Writing C program to implement UNIX commands like grep.

Writing C program to implement UNIX commands like grep.

Code:


Output:

elcot@elcot:~$ gcc -o g1 grepc.c
elcot@elcot:~$ ./g1 hai test1
hai how are you

Hints:

elcot@elcot:~$ gcc -o g1 grepc.c  ->Compile
grepc.c ->program name
g1 -> create object

elcot@elcot:~$ ./g1 hai test1  -> Run
g1 -> object
hai -> string
test1 -> file name

This is grep command implementation.
grep syntax:
grep <String> <file name>

grep command is used to search a  particular word in file.etc.

15 comments:

  1. 23CF1D2C06Alexander26027B71052 January 2025 at 22:42

    33339DB777
    instagram takipçi alma

    ReplyDelete

Powered by Blogger.