This unix and linux site aims to provide book reviews and free ebook on unix linux, unix commands, unix shell, unix programming, unix shell scripting, unix tutorial, suse linux, rehat linux, debian linux, slackware linux, linux server, linux commands, fedora linux, linux gui, linux networking, unix time sharing concepts, programming linux games, samba-3, motif programming, unix signal programming, and linux complete reference, etc

Sed - stream editor

The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group
NAME
sed - stream editor
SYNOPSIS
sed [-n] script[file...]
sed [-n][-e script]...[-f script_file]...[file...]
DESCRIPTION
The sed utility is a stream editor that reads one or more text files, makes editing changes according to a script of editing commands, and writes the results to standard output. The script is obtained from either the script operand string or a combination of the option-arguments from the -e script and -f script_file options.
OPTIONS
The sed utility supports the XBD specification, Utility Syntax Guidelines , except that the order of presentation of the -e and -f options is significant.
The following options are supported:
-e script
Add the editing commands specified by the script option-argument to the end of the script of editing commands. The script option-argument has the same properties as the script operand, described in the OPERANDS section.
-f script_file
Add the editing commands in the file script_file to the end of the script.
-n
Suppress the default output (in which each line, after it is examined for editing, is written to standard output). Only lines explicitly selected for output will be written.
Multiple -e and -f options may be specified. All commands are added to the script in the order specified, regardless of their origin.
OPERANDS
The following operands are supported:
file
A pathname of a file whose contents will be read and edited. If multiple file operands are specified, the named files will be read in the order specified and the concatenation will be edited. If no file operands are specified, the standard input will be used.
script
A string to be used as the script of editing commands. The application must not present a script that violates the restrictions of a text file except that the final character need not be a newline character.

Popular Posts

Linux Unix Books