Skip to main content
2 of 2
Quotes for code
Chris Davies
  • 128.2k
  • 16
  • 179
  • 324

Just add 1 ! before your pattern like this

sed '1 ! s/\(\([^,]*,\)\{9\}[^,]*\),/\1/g'

this would skip the header

Output

$ sed '1 ! s/\(\([^,]*,\)\{9\}[^,]*\),/\1/g' d
Name,Age,Gender,id,Phone,Address,City,State,Country,IPAddress,OtherColumn1,OtherColumn2
John,25,Male,12,123,Main St,New York,NY,USA,120.30.19 119.234.761,Value1,Value2