Sponsored Content
Full Discussion: Chemist Needs Help
Top Forums UNIX for Dummies Questions & Answers Chemist Needs Help Post 302251184 by jim mcnamara on Saturday 25th of October 2008 01:30:54 PM
Old 10-25-2008
Yes. Those come from this:
Code:
awk '/Done/ {print $2; exit}' Ar_b3lyp_pv5z.out | read col3

This just reads the first 'Done' line from the file. YOu need run this
Code:
awk '/Done/ {print $2; exit}' Ar_b3lyp_pv5z.out

and see what you get. I suspect you get nothing. In that case, play with this line awk statment until it produces what you want. Duplicate your efforts on the other line that creates col4. Dont forget to add the | read col3 and read | col4 statements back onto the line.

If you know what the values are supposed to be anyway, hardcode them in, skip the awk for now example:
Code:
col3=99999
#awk '/Done/ {print $2; exit}' Ar_b3lyp_pv5z.out | read col3

The leading # character comments out the line. Repeat this for the col4 line.
 

We Also Found This Discussion For You

1. UNIX for Dummies Questions & Answers

Chemist Needs Help part II

Hello friends, I was wondering if you can help me with probably a simple function to you all: the sample looks and has this format. I was wondering how I could extract the first and second column starting including the line 'E/N and Ko' and not stop until there are no more lines. Thank you for... (5 Replies)
Discussion started by: gingburg
5 Replies
script(1)							   User Commands							 script(1)

NAME
script - make record of a terminal session SYNOPSIS
script [-a] [filename] DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the record is saved in the file typescript. See WARNINGS. The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends when the forked shell exits or when Control-d is typed. OPTIONS
The following option is supported: -a Appends the session record to filename, rather than overwriting it. NOTES
script places everything that appears on the screen in filename, including prompts. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a privileged user, that is, root. Be sure that typescript is not a link before running script. SunOS 5.10 30 Jan 2004 script(1)
All times are GMT -4. The time now is 08:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy