Crates.io | fcc |
lib.rs | fcc |
version | 0.4.2 |
source | src |
created_at | 2020-07-03 10:01:15.074756 |
updated_at | 2021-05-20 02:49:57.703985 |
description | File concatenation utility |
homepage | |
repository | https://github.com/mapkts/fcc/ |
max_upload_size | |
id | 260958 |
size | 25,986 |
A command line utility for file concatenation, featuring:
STDIN
or arg -i
.STDOUT
or a specific file given by arg -o
.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.
Assumes we have three text files 1.txt
, 2.txt
and 3.txt
in current working directory.
The content of 1.txt
is:
111 112 113
121 122 123
131 132 133
The content of 2.txt
is:
211 212 213
221 222 223
231 232 233
The content of 3.txt
is:
311 312 313
321 322 323
331 332 333
find [1-3].txt | fcc
or
echo [1-3].txt | fcc
or
fcc -i 1.txt 2.txt 3.txt
will print the following text to stdout
111 112 113
121 122 123
131 132 133211 212 213
221 222 223
231 232 233311 312 313
321 322 323
331 332 333
--newline
echo [1-3].txt | fcc -n
will print the following text to stdout:
111 112 113
121 122 123
131 132 133
211 212 213
221 222 223
231 232 233
311 312 313
321 322 323
331 332 333
skip-head=1
and skip-tail=1
echo [1-3].txt | fcc -n --skip-head=1 --skip-tail=1
will print the following text to stdout:
121 122 123
221 222 223
321 322 323
newline
and --headonce
echo [1-3].txt | fcc -n --headonce
will print the following text to stdout:
111 112 113
121 122 123
131 132 133
221 222 223
231 232 233
321 322 323
331 332 333
--newline
and padding="padding between\n"
echo [1-3].txt | fcc -n --padding="padding between
"
will print the following text to stdout:
111 112 113
121 122 123
131 132 133
padding between
211 212 213
221 222 223
231 232 233
padding between
311 312 313
321 322 323
331 332 333
Binaries for Windows, Linux and macOS are available from Github.
You can also compile the binary from source using Cargo:
git clone git://github.com/mapkts/fcc
cd fcc
cargo build --release
Compilation will probably take a few minutes depending on your machine. The
binary will end up in ./target/release/fcc
.
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.