Sponsored Content
Full Discussion: Chemist Needs Help
Top Forums UNIX for Dummies Questions & Answers Chemist Needs Help Post 302250513 by gingburg on Thursday 23rd of October 2008 02:28:30 PM
Old 10-23-2008
Chemist Needs Help

Hello All I am a chemist and really dont know too much about programming but here goes.

Essentially I need to create a script that I can run which will do the following.
Create a file where the first four lines are a set of commands that are the same for all the files. E.g
ln1: comment
ln2: x y x
ln3: 101
ln4: 4 7

So the script should print those line into a new file first.

Then i need to make 4 columns.
The first I need to be 1.5 +0.1 100 times.
e.g.
1.5
1.6
1.7
1.8
1.9
etc.

The second column I need to be a column of data which I have used the command awk '/Done/ {print $2}' file
There will be 101 numbers extracted
Note: I would like Done and the number to be a variable to input in the command line.

The third and fourth are the same as the second except there will only be one point that I need to repeat 101 times.

If someone could help me that would be amazing. Also if someone is an expert I will pay them via paypal to help me occasionally. Thank you Lenny.

Last edited by gingburg; 10-23-2008 at 03:54 PM..
 

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
COLUMN(1)						    BSD General Commands Manual 						 COLUMN(1)

NAME
column -- columnate lists SYNOPSIS
column [-tx] [-c columns] [-s sep] [file ...] DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored. The options are as follows: -c Output is formatted for a display columns wide. -s Specify a set of characters to be used to delimit columns for the -t option. -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. -x Fill columns before filling rows. column exits 0 on success, >0 if an error occurred. ENVIRONMENT
COLUMNS The environment variable COLUMNS is used to determine the size of the screen if no other information is available. EXAMPLES
(echo "PERM LINKS OWNER GROUP SIZE MONTH DAY HH:MM/YEAR NAME"; ls -l | sed 1d) | column -t SEE ALSO
colrm(1), ls(1), paste(1), sort(1) HISTORY
The column command appeared in 4.3BSD-Reno. BSD
March 9, 2008 BSD
All times are GMT -4. The time now is 04:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy