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.

why have you posted all of that crap when it's clearly an error in the awk command?

Code:

awk '{if (($1 > $2) && ($3 < $2)) {'

that is an *entire* awk script, and clearly an illegal one, as the is indeed no matching } at the end. It looks like you expect the one about 10 lines later to magically work, but it won't, as it's 10 entire bash commands away.

If sounds like you're trying to use awk to make an "if then else" statement outside of it's own scope or something... very odd. Remove the awk and do it with proper bash instead.

Useful post questions should include only details relevant to your problem, not just a giant dump of everything you have.

Nobody wants to take the time to read through a mess of text to locate your errors for you, so take some time to cut it down to the section or commands that relate directly to the problem at hand. Who knows, you might discover where you went wrong in the process on your own while you're at it.