(Difference between pages)
imported>ThorstenStaerk |
|
Line 1: |
Line 1: |
− | [[sed]] is a [[command]] to edit a text stream in [http://en.wikipedia.org/wiki/Batch_mode batch mode].
| + | Here are some printers and how to set them up: |
− | | + | * [[Brother DCP-J140W]] |
− | For example,
| + | * [[HP OfficeJet 6700]] |
− | sed "s/a/o/"
| |
− | Will read your input (stream) from the keyboard and '''s'''ubstitute every '''a''' by an '''o'''.
| |
− | | |
− | = Usecases =
| |
− | * Remove leading white space | |
− | sed 's/^[ \t]*//'
| |
− | * Replace strings
| |
− | sed -e "s/cgi?\([0-9][0-9]*\)/cgi@\1.html/g" myfile.html > index.html
| |
− | * Insert a line a beginning of file
| |
− | sed -i '1i <This is now at the first line>' <filename>
| |
− | * Replace several newlines by one
| |
− | sed 's/\ \{1,\}/\ /g'
| |
− | | |
− | = See also =
| |
− | * [[piping]]
| |
− | * [[grep]]
| |
− | * [[regex]] | |
Revision as of 06:31, 5 August 2015
Here are some printers and how to set them up: