Skip to content

Instantly share code, notes, and snippets.

@rhydlewis
Created July 17, 2015 12:00
Show Gist options
  • Select an option

  • Save rhydlewis/c23e129e1972bd42916f to your computer and use it in GitHub Desktop.

Select an option

Save rhydlewis/c23e129e1972bd42916f to your computer and use it in GitHub Desktop.

Revisions

  1. Rhyd Lewis created this gist Jul 17, 2015.
    10 changes: 10 additions & 0 deletions switch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    data=$(pbpaste)
    if [ $(echo "$data" | wc -l) -gt 1 ];
    then
    change=${data//
    / }
    else
    change=${data// /
    }
    fi
    echo -e "$change" | pbcopy