Skip to content

Instantly share code, notes, and snippets.

@sleeyax
Last active July 9, 2022 23:16

Revisions

  1. sleeyax revised this gist Jul 9, 2022. 1 changed file with 0 additions and 8 deletions.
    8 changes: 0 additions & 8 deletions installation.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +0,0 @@
    Installation instructions (globally, any user):
    ```
    $ curl https://gist.githubusercontent.com/sleeyax/788f2f4790b02b5e4275b199be637b2f/raw/8edce505a7153712cc0edd67a3999723ddfc1549/lcs.sh -o lcs
    $ sudo chmod +x lcs
    $ sudo mv lcs /usr/local/bin
    ```

    Restart your shell or terminal to use it.
  2. sleeyax revised this gist Jul 9, 2022. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions installation.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    Installation instructions (globally, any user):
    ```
    $ curl https://gist.githubusercontent.com/sleeyax/788f2f4790b02b5e4275b199be637b2f/raw/8edce505a7153712cc0edd67a3999723ddfc1549/lcs.sh -o lcs
    $ sudo chmod +x lcs
    $ sudo mv lcs /usr/local/bin
    ```

    Restart your shell or terminal to use it.
  3. sleeyax created this gist Jul 9, 2022.
    10 changes: 10 additions & 0 deletions lcs.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/usr/bin/sh

    if ! [ -z "$1" ]
    then
    echo "$1" | tr '[:upper:]' '[:lower:]'
    else
    echo "Usage: lcs <text>"
    echo 'Example: lcs "Foo Bar BAZ"'
    echo "Output: foo bar baz"
    fi