Sponsored Content
Top Forums Shell Programming and Scripting Extract numbers from text file work out average Post 302415479 by rich@ardz on Thursday 22nd of April 2010 04:09:20 PM
Old 04-22-2010
many thanks for this, I'm actually scripting it on ubuntu 9.10? now returns the following error:

awk: line 1: syntax error at or near {
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

BASH. Need to extract some numbers and take the average

Hey all, I ran some simulations, of which the output is 100s of files. I've used grep to extract the vital information needed from the files. This has made my task somewhat easier. But I still need to perform some mathematical calculations (average and geometrical average) on the results of the... (9 Replies)
Discussion started by: slackjack
9 Replies

2. UNIX for Dummies Questions & Answers

Extract numbers from .txt file

I need to extract all the p-value numbers and the rho numbers from a .txt file and write them as coma separated values in a new file. Ideally I would get two files in the end, one for p- values and one for rho. Any suggestions? I appreciate your help!!! The .txt file looks essentially like this... (5 Replies)
Discussion started by: eggali
5 Replies

3. Shell Programming and Scripting

Need help please with Grep/Sed command to extract text and numbers from a file

Hello All, I need to extract lines from a file that contains ALPHANUMERIC and the length of Alphanumeric is set to 16. I have pasted the sample of the lines from the text file that I have created. My problem is that sometimes 16 appears in other part of the line. I'm only interested to... (14 Replies)
Discussion started by: mnassiri
14 Replies

4. UNIX Desktop Questions & Answers

Calculate average for rows in a text file

Dear Gurus, I have tab-delimited text files with matrix containing values. The first column is a identifier and other columns have the corresponding values. I would like to calculate the average value (total number/number of entries) for all entries from 2nd column to the last column in row... (3 Replies)
Discussion started by: Unilearn
3 Replies

5. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

6. Shell Programming and Scripting

Need to extract only decimal numbers for a glob of text

If you have a look at this thread, you'll see that users have been posting the output a script which are numbers that range from 2 to 5 decimal places. If I dump this entire thread to txt file, how can I: 1) Delete everything except for numbers of the following formats (where 'x' is a digit and... (5 Replies)
Discussion started by: graysky
5 Replies

7. Shell Programming and Scripting

Color prompt with file numbers does not work anymore

I have used this color prompt on my servers for long time, in file ~\.bashrc Black="\" Dark="\" Blue="\" LBlue="\" Green="\" LGreen="\" Cyan="\" LCyan="\" Red="\" LRed="\" Purple="\" LPurple="\" Brown="\" Yellow="\" LGray="\" White="\" Reset="\" PS1="$Yellow\u@\h $LBlue\w... (4 Replies)
Discussion started by: Jotne
4 Replies

8. UNIX for Dummies Questions & Answers

Extract Numbers from a log file

Hi, I am trying to grep/extract the number list from this log file, can I get some help on this. I can grep the word 'href' to see the numbers, but it is resulting with the complete line. Content of my file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head>... (4 Replies)
Discussion started by: Sajjadmehdi
4 Replies

9. Shell Programming and Scripting

Extract numbers from file name-how to ?

Hello friends,I am new to Unix programming. how do I achieve the following in Unix shell script (I am running ksh on AIX) extract the number from name of file? My file format is like "LongFileName-1234.020614-221030.txt" now I want to extract value which is between (-) hyphen and (.) dot... (4 Replies)
Discussion started by: f150
4 Replies

10. Shell Programming and Scripting

Average result of text file

Hi all I have created a script to allow me to gain a number of file times and how long they take to execute. I have been asked to get the average time for the log. The log will update every 5 minutes and never be empty. 141 152 157 161 168 169 171 179 202 207 229 651 666 714... (3 Replies)
Discussion started by: simpsa27
3 Replies
import-bug-from-debian(1)				      General Commands Manual					 import-bug-from-debian(1)

NAME
import-bug-from-debian - Import bugs from Debian's BTS, and file them against Ubuntu in LP. SYNOPSIS
import-bug-from-debian [options] bug... import-bug-from-debian -h DESCRIPTION
import-bug-from-debian clones bugs from Debian's BTS into Launchpad. Each bug listed on the command line has its initial report re-filed against the same source package in Ubuntu. The Ubuntu bug is linked back to its Debian counterpart. Each bug may be provided either as a bug number or URL. OPTIONS
-b, --browserless Don't open the bug in a browser at the end. -h, --help Display a help message and exit. -l INSTANCE, --lpinstance=INSTANCE Use the specified instance of Launchpad (e.g. "staging"), instead of the default of "production". -p PACKAGE, --package=PACKAGE Launchpad package to file bug against, if not the same source package name as Debian. Useful for importing removal bugs filed against ftp.debian.org. --no-conf Do not read any configuration files, or configuration from environment variables. ENVIRONMENT
All of the CONFIGURATION VARIABLES below are also supported as environment variables. Variables in the environment take precedence to those in configuration files. CONFIGURATION VARIABLES
The following variables can be set in the environment or in ubuntu-dev-tools(5) configuration files. In each case, the script-specific variable takes precedence over the package-wide variable. IMPORT_BUG_FROM_DEBIAN_LPINSTANCE, UBUNTUTOOLS_LPINSTANCE The default value for --lpinstance. SEE ALSO
ubuntu-dev-tools(5) AUTHORS
import-bug-from-debian was written by James Westby <james.westby@ubuntu.com>, and this manual page was written by Stefano Rivera <ste- fanor@ubuntu.com>. Both are released under the terms of the GNU General Public License, version 2. ubuntu-dev-tools September 21 2010 import-bug-from-debian(1)
All times are GMT -4. The time now is 01:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy