Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buzzqrd/lncpy
Simple C program for copying lines between files
https://github.com/buzzqrd/lncpy
c cli copy copy-paste terminal
Last synced: 3 days ago
JSON representation
Simple C program for copying lines between files
- Host: GitHub
- URL: https://github.com/buzzqrd/lncpy
- Owner: buzzqrd
- License: gpl-3.0
- Created: 2023-01-18T05:47:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T05:36:06.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T22:39:49.761Z (about 2 months ago)
- Topics: c, cli, copy, copy-paste, terminal
- Language: C
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lncpy :scissors: :page_with_curl:
Simple C program for copying lines between files## Installing
Using the `make` utility to compile from source:
```
$ git clone https://github.com/buzzqrd/lncpy
$ cd lncpy/
$ sudo make install
```## Usage
This program copies and pastes lines in a similar way to Vim.
Line insertions begin after the line that is specified.
The line numbers to specify start at 1 (not 0), which aligns with Vim line numbers.```
$ lncpy [source lines] [source file] [insert line] [insert file]
```### Examples:
Copy lines 12-41 (inclusive) from the file *old_code.c* to after line 33 in the file *new_code.c*.
```
$ lncpy 12-41 old_code.c 33 new_code.c
```Copy line 15 in *logs.txt* to after line 48 in *report.txt*.
```
$ lncpy 15 logs.txt 48 report.txt
```## Contributing
Contributions to the code are welcome! Just keep in mind that:
- New features should be simple and fit the core functionality
- Code should be in C
- Changes based on personal preference are best left in your fork## Licence
This software is licenced under the GNU General Public License v3.0.
A copy of the licence should be included with the code.
An online copy of the licence can be found at [https://www.gnu.org/licenses/gpl-3.0.en.html](https://www.gnu.org/licenses/gpl-3.0.en.html)