[SOLVED] awk: filter out fields that are blank or are spaces
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
my filtered down example was not representative of the original data so #1 and #2 will not filter out some appropriate lines.
Obviously difficult to tailor a solution if you do not show the type of data. I am curious if the red information shown are errors, ie not supposed to be shown, or are more
correctly showing what you were looking for?
It is also unclear if #4 is not working as that also seems to be the same as the final script shown which does produce output?
Obviously difficult to tailor a solution if you do not show the type of data. I am curious if the red information shown are errors, ie not supposed to be shown, or are more
correctly showing what you were looking for?
It is also unclear if #4 is not working as that also seems to be the same as the final script shown which does produce output?
red are errors; in #4 this didnt work :
Code:
(index($2, "") == 0)
but i changed it to this:
Code:
(index($2, "") != 0)
its healthcare information so i am anxious to not just copy-pasta it.
Yes I certainly don't mean to place the exact data if it is sensitive, just that making a script to do the job would need to see the same type of fields
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.