Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Added more detail
Source Link
user1988900
  • 31
  • 1
  • 1
  • 3

Looking for some way to look at a csv file and delete columns including the header that have no values in the subsequent lines that follow.

Perhaps if I wanted to delete column Test03 from below including Test03 in the first line.

Test01,Test02,Test03,Test04  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  

Looking for some way to look at a csv file and delete columns that have no values.

Perhaps if I wanted to delete column Test03 from below.

Test01,Test02,Test03,Test04  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  

Looking for some way to look at a csv file and delete columns including the header that have no values in the subsequent lines that follow.

Perhaps if I wanted to delete column Test03 from below including Test03 in the first line.

Test01,Test02,Test03,Test04  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
added 28 characters in body
Source Link
devnull
  • 3.4k
  • 2
  • 17
  • 23

Looking for some way to look at a csv file and delete columns that have no values.

Perhaps if I wanted to delete column Test03 from below.

Test01,Test02,Test03,Test04
11,22,,44
11,22,,44
11,22,,44
11,22,,44
11,22,,44
11,22,,44

Test01,Test02,Test03,Test04  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  

Looking for some way to look at a csv file and delete columns that have no values.

Perhaps if I wanted to delete column Test03 from below.

Test01,Test02,Test03,Test04
11,22,,44
11,22,,44
11,22,,44
11,22,,44
11,22,,44
11,22,,44

Looking for some way to look at a csv file and delete columns that have no values.

Perhaps if I wanted to delete column Test03 from below.

Test01,Test02,Test03,Test04  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
11,22,,44  
Source Link
user1988900
  • 31
  • 1
  • 1
  • 3

Delete empty column from csv file with bash script

Looking for some way to look at a csv file and delete columns that have no values.

Perhaps if I wanted to delete column Test03 from below.

Test01,Test02,Test03,Test04
11,22,,44
11,22,,44
11,22,,44
11,22,,44
11,22,,44
11,22,,44