Sponsored Content
Full Discussion: Chemist Needs Help
Top Forums UNIX for Dummies Questions & Answers Chemist Needs Help Post 302250520 by jim mcnamara on Thursday 23rd of October 2008 02:54:04 PM
Old 10-23-2008
Well, you're short on exact information, so my attempt is generalized. It also isn't all that efficient. I picked 42 and 69.42 as the two fixed numbers.
Code:
printf "%s\n%s\n%s\n%s\n" "comment" "x y x"  "101"  "4 7" > newfile

awk '/Done/ {print $2}'  file | \
 awk ' BEGIN { cnt =1.5 }
         {printf("%.1f  %s  42 69.42\n", cnt  $0); cnt+=.1 } >> newfile

 

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
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy