That's why we used the -e option all the time. In fact, you can omit it if you have only one command in your program. But you should get used to the -e option, so you won't have to add it if you want to extend your program later on. Often, we don't know the numbers of the lines we want to delete. A good example is a log file.
Log files tend to grow until they become too large to handle.
Let's assume that you have a large log file called log which contains thousands of lines. This works just like grep -v debug . A Slightly More Complex Example We are still working with the large log file. Putting sed Programs Into Files Now that your programs are getting a little more advanced, you might want to put them in script files instead of using the command line. From now on I will assume that you run the examples through sed -f .