Code Monkey home page Code Monkey logo

sed-i's Introduction

sed-i

A wrapper for sed(1), to emulate the non-portable in-place editing capability (-i, --in-place) by using a temporary file. It mirrors the options mandated by POSIX (-e, -f, -n), with the addition of the non-portable -r and -E, for extended regular expressions, and GNU style long-option versions. If no -i is used, a single sed(1) will be run, as opposed to running one per file, where each one is writing to a temporary file. The temporary file will eventually be moved to overwrite the original file.

There are a lot of unportable build scripts/systems, preventing the usage of sed(1) from sbase or 9base, for example. Instead of keeping a separate sed(1) around, this wrapper can be used as compatiblity layer.

To use this wrapper, it should be placed in a directory which is listed in $PATH first, before the directory containing the wrapped sed(1).

Installation

make install
PATH=/usr/local/bin:$PATH

Options

-e <script> | --expression=<script> | --expression <script>
-f <script_file> | --file=<script_file> | --file <script_file>
-i[<suffix>] | --in-place[=<suffix>]
-n | --quiet | --silent
-r | -E | --regexp-extended

All other options will be passed to the wrapped sed(1) as is.

sed-i's People

Contributors

aaronngi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.