remove no data rows from a text file
We have very large data files that looks like this:
"2009" 0 "schedule" "4874786142354" 0 "reduce" "lmjdnjg0479" 15 0 0 Using a bash script, how do I remove the lines with the 0 in it? So that I get: "2009" "schedule" "4874786142354" "reduce" "lmjdnjg0479" 15 |
Just delete them using sed. If the lines contain 0 and nothing else (spaces, tabs, control-characters) this should work:
Code:
sed -i.bck '/^0$/d' file |
All times are GMT -5. The time now is 04:16 PM. |