Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a text file consisting five columns (tab separated). The first column is a timestamp; the other columns have values between +4000.0 and -4000.0 .I like to remove all the lines, which apart from the timestamp, have only "0" values.
Do you have any suggestion how to do this easily (awk or sed)?
The two lines in shaded brown (containing only zeroes) are removed from the output. Moreover, notice that you might omit the FS specification since TAB is one of the default separators in awk. From the GNU awk user's guide:
By default, fields are separated by whitespace, like words in a line. Whitespace in awk means any string of one or more spaces, TABs, or newlines;
In POSIX awk, newlines are not considered whitespace for separating fields.
All of them return what I was looking for. I will check tomorrow on a Solaris 8 machine.
The 3rd piece of code makes sense to me but for the other two it's not clear for me why I get this result, -
and why my first attempt
I've checked different syntaxes which is working on openSUSE on a solaris8 machine and none of them are working. They return an error message:
awk: syntax error near line 1
awk: bailing out near line 1
I've checked the