They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. This page was updated July 12, 2001. I was recently attempting to use sed to append text to a file and had great difficulty achieving the required result due to syntax problems. It would be great if you could provide more worked examples in the sed section of the book. I think that the existing examples need to show the actual unix command line so that the reader knows the correct syntax to use.
Data file prior to issuing the sed command.
The sed command as entered on the command line. The data file after issuing the sed command. I also had difficulty attempting to make sed use variables when attempting to implement sed commands within a korn shellscript. I have shown below an extract from my korn script - the intention was to provide a covenient means of updating a config parameter in a file by commenting out the old version and appending the new version beneath it. The description of bc in the Unix Commands section needs some pertinent examples of how to use the function.