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.
Usually awk shows the number of the line where the error occurred. Please show us the complete error message along with the relevant parts of the code. My suspect is that the file movie.xyz is not actually an Extended XYZ file.
This means that 'det' is 0, 'r' is not assigned or it's 0 (see line 47), the same for 'lattice' (see line 43) and for 'lat' (see lines 36-38). I stay of my idea that the input file is not really an Extended XYZ.
You can easily verify by the following commands:
and if it is an ASCII text file:
You should see the line starting with Lattice with all the key/value pairs of an Extended XYZ.
This confirms that your file movie.xyz is an ASCII text file, as it should be. A general advice: if you're new to the linux command line, always (and I mean always) check the manual page of every command you're suggested to type. Don't trust commands blindly, since everyone could make a typo or a mistake of some kind. It's better you're sure about what you're doing.
But maybe you already did. This is ol' pedantic uncle colucix speaking!
Yes. It is an extended XYZ file. On the other hand it is the example from the developers site, isn't it? Just out of curiosity I tried the code you've posted on the example file and it works for me. Having GNU Awk 3.1.6, here.
At this point I can't explain the error anymore. I have some experience with awk, but I cannot see any mistake in the code.