Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The sed utility is a stream editor that can be used for different file editing purposes when used as a filter. The most common task for software development purposes is the use of sed to search and replace text in source code files. Let us take the example of the following C source code file hello.c.
#include <stdio.h>
main ()
{
char string[25];
printf ("Enter a line of characters : ");
scanf ("%s", string);
printf ("The entered string is : %s\n ", string);
}