Announcing zp: zp is a cli command to copy the contents of the source file or of the std output buffer to the clipboard, allowing users to easily paste the contents into another file or program

71 points New-Blacksmith8524

Usage:

zp my_file.txt

To get the first \n\\ (n is an integer) words of the file :

zp my_file.txt n

To get the lines between a range, i.e., to get lines from \n\\ till \m\\ (n and m are integers) of the file:

zp my_file.txt n m

Also, you can use zp to copy from the std output buffer :

cat sample_file.txt | zp

This copies the entire output of the file.

​

You can also get a range of lines or the first n words also from the std output buffer :

cat sample_file.txt | zp 2

cat sample_file.txt | zp 2 5

This gets the first 2 words and lines from 2 to 5 of the sample\_file.txt respectively.

​

Check zp out here : \https://github.com/bahdotsh/zp\