项目作者: tomkyle

项目描述 :
Creates a file copy with given suffix
高级语言: Shell
项目地址: git://github.com/tomkyle/cps.git
创建时间: 2017-09-27T11:14:47Z
项目社区:https://github.com/tomkyle/cps

开源协议:

下载


cps

Create a file copy with given suffix

Installation

MacOS · Homebrew

The cps bash script can be installed by a Homebrew formula, which itself is part of the tomkyle/daily tap. You may may want to install the tap first.

  1. # Install tap first, formula second:
  2. $ brew tap tomkyle/daily
  3. $ brew install cps
  4. # Without tapping first:
  5. $ brew install tomkyle/daily/cps

Linux

Just clone the repo and create a symlink in your local ~/bin directory:

  1. $ git clone git@github.com:tomkyle/cps.git cli-cps
  2. # Create sylink
  3. $ cd ~/bin
  4. $ ln -s /full/path/to/cli-cps/cps cps

Usage

Pass a source file and a filename suffix for the copied target.

  1. $ cps foo.pdf -bar
  2. $ ls
  3. foo.pdf
  4. foo-bar.pdf

What happens inside

After building the target file name, a simple copy command is used. Considering the usage example above:
cp foo.pdf foo-bar.pdf.

Issues

See issues list.