| Linux Know-How provides a collection of introductory texts on often needed Linux skills. |

Linux Know-How Bash Guide for Beginners The GNU stream editor Non-interactive editing |
||||||||
| See also: SED Commands | ||||||||
Non-interactive editingReading sed commands from a fileMultiple sed commands can be put in a file and executed using the -f option. When creating such a file, make sure that:
Writing output filesWriting output is done using the output redirection operator >. This is an example script used to create very simple HTML files from plain text files.
$1 holds the first argument to a given command, in this case the name of the file to convert:
More on positional parameters in Chapter 7.
This is not really how it is done; this example just demonstrates sed capabilities. See Section 6.3 for a more decent solution to this problem, using awk BEGIN and END constructs.
|
||||||||