https://github.com/setlog/cb
Read and write clipboard contents with file and standard IO on the command line.
https://github.com/setlog/cb
Last synced: 4 months ago
JSON representation
Read and write clipboard contents with file and standard IO on the command line.
- Host: GitHub
- URL: https://github.com/setlog/cb
- Owner: setlog
- License: mit
- Created: 2019-10-09T14:38:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-16T11:14:32.000Z (over 2 years ago)
- Last Synced: 2025-11-22T16:06:21.020Z (7 months ago)
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# cb
## Usage
Copy file contents to clipboard:
```sh
cb file.txt
```
Copy stdin contents to clipboard:
```sh
echo foo | cb
```
Omit exactly one trailing line break if it exists:
```sh
echo foo | cb -n
# or
echo -n foo | cb
```
Manually write the clipboard:
```sh
cb
Hello World!^D # ^D = Ctrl+D (send EOF)
```
Write clipboard to stdout:
```sh
cb -o
```
Write clipboard to file:
```sh
cb -o file.txt
```
## Installation
```sh
go get -u github.com/setlog/cb
```