Skip to main content
Nothing to do with the shell.
Link
Stéphane Chazelas
  • 584.8k
  • 96
  • 1.1k
  • 1.7k
Source Link

ERROR : invalid command code ~

I am actually learning about sed command tutorial , where I am running below command in order to print the line 1st,4th,7th,10th,13th ..... line from Notes.txt. I am using MAC terminal

sed -n '1~3p' Notes.txt

I am facing below issue while running above command. Any help will be more appreciated.

sed: 1: "1~3p": invalid command code ~