Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by timf

3 years ago

Since I'm bouncing between OSX and Linux a lot, I have a shell script with the same name on each that boils down to:

  if [ `uname` == "Darwin" ]; then
    pbcopy
  else
    xsel --clipboard
  fi

2 comments

timf

Reply

cerved  3 years ago

why not just alias?

  • timf  3 years ago

    Could be an alias, I have a limited set of aliases for each type of system. But I keep a repository of hundreds of personal shell scripts and it fit better there.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities