问题
Is there an equivalent solution to grab selected text in OS X as 'xsel -o' works for Linux?
Just need the current selection so I can use the text in shell script.
Cheers, Erik
回答1:
You can probably install xsel on MacOS. (UPDATE: According to Arkku's comment, that will only work if you have the X11 server running and synchronized to the OS X pasteboard.)
If not, a quick Google search turns up pbcopy / pbpaste, which apparently is pre-installed.
Link: https://github.com/raymontag/keepassc/issues/59
来源:https://stackoverflow.com/questions/28857592/xsel-o-equivalent-for-os-x