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.
How are we supposed to know what .plt and .are files are.
Also, the >> "area.plt" part should be outside the awk command. Otherwise we can't tell you what the output would look like without a sample of the input.
I don't see why you would unless you are running an actual awk script.
Actually it is useful only when you have multiple redirections (to different files) inside the awk script or when the file name is built dinamycally under certain conditions.
@gav251: please follow the advice in the previous posts and show us the content (or just a sample) of the input file. Don't forget to embed it in CODE tags to preserve spacing and tabs (since they might be important to solve the puzzle). To use CODE tags, either put [CODE] and [/CODE] around the text or switch to advanced mode and press the # button.
The .plt file is a new file, > would be ok. .mol file is a large file containing mathematical data about a proteins geometry. I didn't post it since the data is irrelevant. I just need to redirect columns 3, 6 and 7. Sorry for the ambiguity.
g.
I didn't post it since the data is irrelevant. I just need to redirect columns 3, 6 and 7.
Obviously it's not irrelevant, otherwise your awk command would work. So showing one line of the input and the result which is produced by this line would allow to investigate the behavior.
Obviously it's not irrelevant, otherwise your awk command would work. So showing one line of the input and the result which is produced by this line would allow to investigate the behavior.
The same from me. The result from such a simple code should be obvious, so most likely the problem resides in the input format: separators, hidden characters and so on. Please post a line of input, the corresponding output (as suggested above) plus the output of the following:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.