Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Add '-' to paste command to add compatibility with Mac OS. #22

Closed

Conversation

keithrbennett
Copy link

The paste commands generated an error as is, but adding the '-' fixed it and continued to work in my Linux VM. Here is the error I got in Mac OS without the hyphen:

usage: paste [-s] [-d delimiters] file ...

Here is the output of uname -a on my Mojave 10.14.2 Mac OS system:

Darwin MacBook-Pro-KB-13.local 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64

...and on my Linux system:

Linux ubuntu 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

@learnbyexample
Copy link
Owner

Hey,

Thanks for this detail. Unfortunately there are lot of differences between various implementations of tools. May be manageable for commands like paste or head, but too many for tools like grep or sed or awk and so on. See this stackoverflow thread for an example for sed differences.

To cover this, there's a note in README that says:

Examples have been tested on GNU/Linux - there'd be syntax/feature variations with other distributions, consult their respective man pages for details.

and each command also includes details like version number, few lines from man page, etc to indicate which implementation is being presented.

@learnbyexample
Copy link
Owner

I'm no longer actively working on this repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants