I got some hint that MacOs has different command when using 'sed'.
The original command I have to do was like:
sed -n '1~36p' /filename
What I got is changing
sed [-an] command [file...]
into
sed [-an] [-e command] [-f command_file] [file...]
so I changed my command as
sed -n -e '1~36p' -f /filename
But it came out with different error like
sed: 1: "1~36p ": invalid command code ~
Did I got wrong command? I want to know how to change properly for Mac.
sed: 1: "1~36p ":- there is a space afterpin error message.~is a GNUsedextension and is not available with the defaultsedthat comes with macOS. Install GNUsedwith, e.g., Macports or Homebrew if you absolutely need this.first~stepform for selecting lines is a GNU extension. You need GNUsed(or useawk).-foption is a file that contains sed commands to be run. It is not the input file to be processed.-eoptional unless you're supplying more than one command (e.g.sed -e '1-3 d' -e 's/this/that/' /filename), or supplying arguments in a nonstandard order, or something like that. In other words, the-eand-fare both irrelevant here. The only problem is that~is not supported.