Sponsored Content
Top Forums Shell Programming and Scripting awk with paste ... columnwise Post 302165019 by dpath2o on Wednesday 6th of February 2008 12:27:58 PM
Old 02-06-2008
condensed question

So the condensed version of what I'm seeking help on is ...

Suppose I have a file

#time(epoch) data1 data2 ... dataN
10000000 9.5 13.4 ... 1
10000001 9.3 13.3 ... 1
10000002 9.0 13.4 ... 1
10000003 9.1 13.2 ... 1
.
.
.
.
10000000 9.9 13.5 ... 2
10000001 999 13.6 ... 2
10000002 9.9 13.6 ... 2
.
.
.
.
10000000 ? ? ... N


And what I want to do is create a file that looks like

#time(epoch) data2 data2 ... dataN
10000000 9.5 9.9 ... ?
10000001 9.3 NAN ... ?
10000002 9.0 9.9 ... ?
.
.
.


So basically I'm looking to concatenate a file by a certain column AND filter that column such that values exceeding, let's say 20, will be given a NAN or blank, whichever gnuplot can handle.

I hope this a little more clear in terms of what I'm seeking help for as well as is a little more inline with the title ...

THANKS
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

awk or sed or paste

i have a file and i need the text to line up currently the file looks like so job scheduled complete 12 12:00 wendsday 13 1:00 wednsday its a text file but not sure how to manipulate the file for it to line up (3 Replies)
Discussion started by: leprichaun
3 Replies

2. Shell Programming and Scripting

how to replace paste utility with sed/awk

hi I have two file that I would like to paste line by line. I use to use paste for this. But my current platform will not have paste utility. Could anyone please suggest how I it can be done using sed,awk or even simple bourne shell scripts? Thanks Sabina (1 Reply)
Discussion started by: ssayeed
1 Replies

3. UNIX for Dummies Questions & Answers

cut and paste columns using awk

Hi, Let's say that I have a file called table, I know that if I need to see a the second column for exampls I use: awk ' {print $2}' table.txt Is there anyway to use awk to actually cut a column and put it somewhere else in the table?:confused: (8 Replies)
Discussion started by: cosmologist
8 Replies

4. Shell Programming and Scripting

appending several columns with awk and paste

Hello, I am trying to solve for a couple of hours now the following problem: I have n files and would like to add the third column of each file to a new file: temp1.txt 1 2 3 1 2 3 1 2 3 temp2.txt 1 2 4 1 2 4 1 2 4 1 2 4 temp3.txt (2 Replies)
Discussion started by: creamcheese
2 Replies

5. Shell Programming and Scripting

awk/grep copy and paste and insert in between lines.

Hi all, I'm a unix newb andI'm trying to write a script that can copy some text paste it in a certian place and then add a number. It's not really clear but I'll show an example. what the file looks like right now: Linux 2.6.24-24-generic (abc) 07/15/09 23:25:01 CPU ... (6 Replies)
Discussion started by: the1hand3r
6 Replies

6. Shell Programming and Scripting

cut and paste using awk

Hi i need a favour i have a file which has some trillions of records. The file is like this 11111000000000192831840914000000000000000000000000000 45789899090000000000000000011111111111111111111111111 I want to cut specific postions in each line like cut1-3 and assisgn it to a variable and... (5 Replies)
Discussion started by: richa2.m
5 Replies

7. Shell Programming and Scripting

copy/paste with awk

Hi everybody, I have two XML files. I am working on a script that could copy and paste the contents of the first xml file to the desired location in the second xml file. Here is my first XML file. This is the second XML file. Finaly, I wnat to obtain something like that : ... (2 Replies)
Discussion started by: lsaas
2 Replies

8. Shell Programming and Scripting

awk columnwise adjacent match checking program

Hi, For the below problem, awk script is needed.. input file : jill jack jill jill jack jill jack jill Required: here, i need to check from first line. reference is jack. jill need to verified with next line jack. if found print jill & jack combination hill1 jack & jill &... (0 Replies)
Discussion started by: vasanth.vadalur
0 Replies

9. Shell Programming and Scripting

Use sed/awk to do like copy and paste

I have rrd file which is have the gaps and I want to fill it out with some value , I've got 10 NaN record and I try to populate data from 10 records be for NaN to change instead of NaN :( <!-- 2016-05-19 14:10:00 CST / 1463638200 -->... (11 Replies)
Discussion started by: boobytrap
11 Replies

10. Shell Programming and Scripting

Need to create a report using paste or with awk

Input file will be Name: serve1 has disk :Yes dev (8): Name: serve2 has disk :No dev (8): Name: serve3 has disk :No Name: serve4 has disk :Yes dev (8): Need output like that. I was using pate -d, - - - . But that need all the line in same format in this some server it has... (4 Replies)
Discussion started by: ranjancom2000
4 Replies
Courier::Filter::Module::BlankBody(3pm) 		User Contributed Perl Documentation		   Courier::Filter::Module::BlankBody(3pm)

NAME
Courier::Filter::Module::BlankBody - Blank-body message filter module for the Courier::Filter framework SYNOPSIS
use Courier::Filter::Module::BlankBody; my $module = Courier::Filter::Module::BlankBody->new( response => $response_text, logger => $logger, inverse => 0, trusting => 0, testing => 0, debugging => 0 ); my $filter = Courier::Filter->new( ... modules => [ $module ], ... ); DESCRIPTION
This class is a filter module class for use with Courier::Filter. It matches a message if its body is blank or consists only of whitespace, which is a frequent symptom of stupid spammers. Constructor The following constructor is provided: new(%options): returns Courier::Filter::Module::BlankBody Creates a new BlankBody filter module. %options is a list of key/value pairs representing any of the following options: response A string that is to be returned literally as the match result in case of a match. Defaults to "Message body is blank". All options of the Courier::Filter::Module constructor are also supported. Please see "new" in Courier::Filter::Module for their descriptions. Instance methods See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods. SEE ALSO
Courier::Filter::Module, Courier::Filter::Overview. For AVAILABILITY, SUPPORT, COPYRIGHT, and LICENSE information, see Courier::Filter::Overview. AUTHOR
Julian Mehnle <julian@mehnle.net> perl v5.14.2 2011-12-27 Courier::Filter::Module::BlankBody(3pm)
All times are GMT -4. The time now is 11:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy