Simulation of ‘ls’ and ‘grep’ using c program


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfShSmc4uzJ32B_Cnh6KDE7EeSGsUpqwnmXpsZMSrMSp0wjgo7gGWZu_JIDHC_zUiWwWkPBhm3Pz_vS0k-tjHPGbd4J7sxNkEVv5q-YbMtId0PtXLQqi2n_k4Dee10jKN6F-IOkz4Wqgg/s1600/c+and+c%252B%252B+meansofmine.jpg
SIMULATION OF  ‘LS’ AND ‘GREP’

AIM:

       To implement the  simulation of ‘ls’ and ‘grep’ using c program.

ALGORITHM:

     1.   Start the program
.    2.   Assign string for a character variable
     3.   Grep command finds the pattern prints the pattern if it is parent in the file.
     4.   The result is given if the pattern is found in the file
     5.   Given file is sorted and become displayed
     6.   Then two files are compared and different between the file in terms of bytes is
            displayed             
     7.   Stop the  program.


PROGRAM:

    #include <stdio.h>
    Main()
   {
    Printfr(“Files are directory”);
    System(“\s”);
    Printf(“Searching a keyword is a file”);
    System(“Grep Krishna san.c”);
    Printf(“Sorting a file and output as follows”);
    System(“Sort sari.c”);
    Printf(“Compared files”);
   System(“Compare san.c san%c”);
   Printf(“To days date”);
   System(“Data”);
   }

0 comments:

Post a Comment