LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

vipe

Insert text editor into pipelines

TLDR

Edit pipe content
$ echo "text" | vipe
copy
Edit command output
$ cat [file.txt] | vipe | [next_command]
copy
Edit with specific editor
$ EDITOR=[vim] cat [file.txt] | vipe
copy
Transform data interactively
$ echo '{"key": "value"}' | vipe | jq .
copy

SYNOPSIS

vipe < stdin > stdout

DESCRIPTION

vipe inserts a text editor into a Unix pipeline. It reads standard input into a temporary file, opens it in the editor specified by the EDITOR or VISUAL environment variable, and writes the edited content to standard output when the editor exits.This allows interactive modification of data flowing through a pipeline, which is useful for manually fixing input before it reaches the next command, debugging pipeline data, or performing one-off transformations that are easier to do in an editor than with sed or awk.

ENVIRONMENT

EDITOR - Editor to useVISUAL - Visual editor

EXAMPLE

$ $ seq 5 | vipe | sort -r
# Editor opens with:
# 1
# 2
# 3
# 4
# 5
# Make edits, save, quit
# Output continues through sort
copy

INSTALL

sudo apt install moreutils
copy
sudo dnf install moreutils
copy
sudo pacman -S moreutils
copy
sudo apk add moreutils
copy
sudo zypper install moreutils
copy
brew install moreutils
copy
nix profile install nixpkgs#moreutils
copy

CAVEATS

Part of moreutils package. Breaks non-interactive pipelines. Editor must be terminal-based.

HISTORY

vipe is part of moreutils by Joey Hess. It enables interactive editing within Unix pipelines.

SEE ALSO

vidir(1), sponge(1), tee(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid