fcc
A command line utility for file concatenation, featuring:
- Accepts input files from either
STDIN
or arg-i
. - Writes concatenation result to either
STDOUT
or a specific file given by arg-o
. - Allows you to skip unwanted contents of each source from either start or end.
- Allows you to fill some paddings before, between and/or after each source.
- Allows you to force the presence of ending newlines after each source.
See fcc --help
for more help information on how to use this command line utility. And if you want a rust library that provides similar functionalities, see admerge.
Examples
Assumes we have three text files 1.txt
, 2.txt
and 3.txt
in current working directory.
The content of 1.txt
is:
The content of 2.txt
is:
The content of 3.txt
is:
Concatenate them without configurations.
|
or
|
or
will print the following text to stdout
Concatenate them with --newline
|
will print the following text to stdout:
Concatenate them with skip-head=1
and skip-tail=1
|
will print the following text to stdout:
Concatenate them with newline
and --headonce
|
will print the following text to stdout:
Concatenate them with --newline
and padding="padding between\n"
|
will print the following text to stdout:
Installation
Binaries for Windows, Linux and macOS are available from Github.
You can also compile the binary from source using Cargo:
Compilation will probably take a few minutes depending on your machine. The
binary will end up in ./target/release/fcc
.
License
fcc
is distributed under the terms of either the MIT license or the Apache License (Version 2.0).
See the LICENSE-APACHE and LICENSE-MIT files in this repository for more information.