View Single Post
Old 08-09-2018, 07:57 PM   #2
Junior Member
Location: Boston

Join Date: Aug 2018
Posts: 4

Found it in a post here:

You can accomplish the same thing with sed. devnulls answer shows how to do it with GNU sed. Below are alternatives for versions of sed that do not have the ~ operator:

keep odd lines

sed 'n; d' infile > outfile
keep even lines

sed '1d; n; d' infile > outfile"
anoopkmr is offline   Reply With Quote