Skip to content

sjmulder/cycle

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cycle

Build status

Repeat a file or stream forever.

... | cycle | ...

Description

cycle copies standard input to standard output, repeating forever. The input is buffered to a temporary file if it does not support seeking.

Examples

Repeat a stream:

$ echo test | cycle
test
test
...
^C

Repeat a file:

$ cycle <foo.txt

Repeat multiple files:

$ cat foo.txt bar.txt | cycle

Running

Should work with any Unix, including Linux and macOS.

Mac users can install from my Homebrew tap

brew install sjmulder/tap/cycle

To compile, install and uninstall from source:

make
make install   [DESTDIR=] [PREFIX=/usr/local] [MANPREFIX=PREFIX/man]
make uninstall [DESTDIR=] [PREFIX=/usr/local] [MANPREFIX=PREFIX/man]

Author

Sijmen J. Mulder (ik@sjmulder.nl)