Another sed question.
Gregory A. Hooten
gahooten at orion.arc.nasa.gov
Sat Dec 2 05:50:48 AEST 1989
I ran across a shell script that had this as the first line of code.
-------------------------------------------------------------
#!/bin/sed d1
Some bunch of text for several lines.
-------------------------------------------------------------
What it did was to delete the line starting with the # sign and display all
of the text that was in the file. My questions are, why do it this way in-
stead of using echo? Why is the # line considered line 1, when it was used
to start the command in the first space, it seems to me that the line would
have already been sent to the terminal to start the sed, and so would not
be deleted? Could someone explain the process of this part of the sed command
and script files?
Thanks
Greg Hooten
GAHOOTEN at ames.arc.nasa.gov
More information about the Comp.unix.questions
mailing list