Skip to content

hugojosefson/sponge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sponge

Reimplementation of sponge(1) from moreutils, for Deno.

JSR CI

Requirements

Requires Deno v1.44.1 or later.

Usage

Soak up stdin, write to stdout

deno run jsr:@moreutils/sponge

Soak up stdin, write to a file

deno run --allow-write=file.txt jsr:@moreutils/sponge file.txt

Soak up stdin, append to a file

deno run --allow-write=file.txt jsr:@moreutils/sponge -a file.txt

Example usage

Given a file file.txt with the following contents:

The quick brown fox jumps over the lazy dog.

The foo bar baz.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Running this command, will replace its contents with the same, piped through sed:

cat file.txt |
sed -e 's/foo/bar/' |
deno run --allow-write=file.txt jsr:@moreutils/sponge file.txt

About

Reimplementation of sponge from moreutils, for Deno.

Topics

Resources

License

Stars

Watchers

Forks

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy