/trim-text

This Docker image is intended to provide a UI that integrates command line text cut operations.

Primary LanguageShell

trim-text

Docker Pulls Docker Cloud Automated build

dockeri.co

Description

This Docker image is intended to provide a UI that integrates command line text cut operations.

Demo

# Create sample file.
$ cat >sample.txt <<EOF
1****
*2***
**3**
***4*
****5
EOF

# Remove one line from top, bottom, left and right
$ cat sample.txt | docker run -i genzouw/trim-text -t1 -b1 -l1 -r1
2**
*3*
**4

# Same as previous example
$ docker run -i genzouw/trim-text -t1 -b1 -l1 -r1 < sample.txt
2**
*3*
**4

It is convenient to set the following aliases.

$ echo "alias tt='docker run -i genzouw/trim-text'" >> ~/.bashrc

$ alias tt='docker run -i genzouw/trim-text'

Requirements

Installation

No installation is required.

Usage

You have the following options:

  • -t : Number of characters to trim from top
  • -b : Number of characters to trim from bottom
  • -l : Number of characters to trim from left
  • -r : Number of characters to trim from right

License

This software is released under the MIT License, see LICENSE.

Author Information

genzouw