All Projects â†’ vi â†’ fdlinecombine

vi / fdlinecombine

Licence: other
Read multiple fds and print data to stdout linewise.

Programming Languages

c
50402 projects - #5 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to fdlinecombine

jira-cli
🔥 [WIP] Feature-rich interactive Jira command line.
Stars: ✭ 809 (+1922.5%)
Mutual labels:  console
pyeez
easy elegant representation on console
Stars: ✭ 14 (-65%)
Mutual labels:  console
command-line
⌨ Command line options and arguments parser.
Stars: ✭ 35 (-12.5%)
Mutual labels:  console
laravel-web-console
💻 Web console for your Laravel application
Stars: ✭ 142 (+255%)
Mutual labels:  console
WeConsole
功能全面、界面与体验对标 Chrome devtools 的可定制化的小程序开发调试面板
Stars: ✭ 137 (+242.5%)
Mutual labels:  console
console.img
🎉 Display a picture in the Chrome browser console
Stars: ✭ 44 (+10%)
Mutual labels:  console
UE4 MagicConsole
Enhanced UE4 output log widget
Stars: ✭ 71 (+77.5%)
Mutual labels:  console
cmdr
POSIX-compliant command-line UI (CLI) parser and Hierarchical-configuration operations
Stars: ✭ 94 (+135%)
Mutual labels:  console
vscode-fzf-quick-open
vscode extension providing quick file/folder open and searching using fzf
Stars: ✭ 42 (+5%)
Mutual labels:  fd
ctable
C library to print nicely formatted tables
Stars: ✭ 13 (-67.5%)
Mutual labels:  console
croatoan
Common Lisp bindings for the ncurses terminal library.
Stars: ✭ 111 (+177.5%)
Mutual labels:  console
RecoverPy
🙈 Interactively find and recover deleted or 👉 overwritten 👈 files from your terminal
Stars: ✭ 189 (+372.5%)
Mutual labels:  console
circumflex
🌿 It's Hacker News in your terminal
Stars: ✭ 43 (+7.5%)
Mutual labels:  console
pretty-routes
Display your Laravel routes in the console, but make it pretty. 😎
Stars: ✭ 627 (+1467.5%)
Mutual labels:  console
ascii chart
Nice-looking lightweight console ASCII line charts ╭┈╯. Port of kroitor/asciichart.
Stars: ✭ 24 (-40%)
Mutual labels:  console
ConEmuIntegration
Using the console emulator ConEmu within Visual Studio. This project integrates the console emulator ConEmu in Visual Studio.
Stars: ✭ 36 (-10%)
Mutual labels:  console
preact-component-console
A console emulator for preact.
Stars: ✭ 29 (-27.5%)
Mutual labels:  console
ishell
Create shell environments with Python
Stars: ✭ 70 (+75%)
Mutual labels:  console
yii-console
Yii console components
Stars: ✭ 48 (+20%)
Mutual labels:  console
slim-command
Useful commands for slim application
Stars: ✭ 13 (-67.5%)
Mutual labels:  console

Multiplex multiple input streams into stdout using \n as separators.

It is attempt to make a program that Does One Thing, But Does It Well.

For example,

./fdlinecombine <( sleep 0; echo qqq ) <( sleep 0; echo www) <( sleep 0; echo eee)

should produce one of:

  • qqq\nwww\neee\n
  • qqq\neee\nwww\n
  • eee\nqqq\nwww\n
  • eee\nwww\nqqq\n
  • www\neee\nqqq\n
  • www\nqqq\nqqq\n

, but never "qqwww\nqee\ne\n" or like that.

The program should handle very long lines (storing them in memory), short reads, memory outage. In case of memory outage it closes the problematic file descriptor.

The program dynamically shrinks and enlarges buffers as line gets longer (or many bytes available at once)

In case of only short lines the program should use little memory:

yes | ( ulimit -v 500; ./fdlinecombine_static 0)  > /dev/null

Example of listening two sockets and combining the data to file:

./fdlinecombine <( nc -lp 9988 < /dev/null) <( nc -lp 9989 < /dev/null) > out

You can override line separator (it can be longer than one character) with SEPARATOR environment variable set to additional file descriptor (or file name). Trailing lines that does not end in separator are also outputted (followed by separator) unless NO_CHOPPED_DATA is set.

More advanced example:

SEPARATOR=<(printf %s '\n---\n')  ./fdlinecombine 0 5 6  \
       5< <(nc -lp 9979 < /dev/null)   \
       6< <(perl -e '$|=1; print "TIMER\n---\n" and sleep 2 while true' < /dev/null) \
       > out 

This will transfer data from stdin, opened TCP port and periodic timer to file "out" using "---" line as separator.

Pre-built executables are on "Download" GitHub page or here:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].