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

Join Date: Aug 2018
Posts: 4
Default

Found it in a post here:https://stackoverflow.com/questions/...om-a-text-file

"sed
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