
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