manpagez: man pages & more
info sed
Home | html | info | man
[Top] [Contents] [Index] [ ? ]



This applies to commands such as =, a, c, i, l, p. You can still write to the standard output by using the w or W commands together with the ‘/dev/stdout’ special file


Note that GNU sed creates the backup file whether or not any output is actually changed.


Actually, if sed prints a line without the terminating newline, it will nevertheless print the missing newline as soon as more text is sent to the same output stream, which gives the “least expected surprise” even though it does not make commands like ‘sed -n p’ exactly identical to cat.


This is equivalent to p unless the ‘-i’ option is being used.


This is equivalent to p unless the ‘-i’ option is being used.


All the escapes introduced here are GNU extensions, with the exception of \n. In basic regular expression mode, setting POSIXLY_CORRECT disables them inside bracket expressions.


sed guru Greg Ubben wrote an implementation of the dc RPN calculator! It is distributed together with sed.


This requires another script to pad the output of banner; for example

#! /bin/sh

banner -w $1 $2 $3 $4 |
  sed -e :a -e '/^.\{0,'$1'\}$/ { s/$/ /; ba; }' |


Some implementations have a limit of 199 commands per script


which is the actual “bug” that prompted the change in behavior

[Top] [Contents] [Index] [ ? ]

This document was generated on January 5, 2013 using texi2html 5.0.

© 2000-2019
Individual documents may contain additional copyright information.