06-06-2011
Great! I need to take this one step further:
I have this input file
Quote:
Danki1> Macha
ABC_0_1: (30226542)
ABC_1_1: (30258488)
ABC_2_1: (30285886)
Danki2> Macha
ABC_0_1: (30268440)
ABC_1_1: (39451707)
ABC_2_1: (30229064)
and I want to get this output
Quote:
Danki1> Macha Value
ABC_0_1: 30226542 2374099.824
ABC_1_1: 30258488 4.90031E+15
ABC_2_1: 30285886 0
Danki2> Macha
ABC_0_1: 30268440 2377390.642
ABC_1_1: 39451707 6.38914E+15
ABC_2_1: 30229064 0
The formula to get the
value Cloumn is as follows:
Quote:
(((((Value inside the parenthesis) * (constant a=0.75))/(constant b=536454))*(constant c=53))) * (variable s= 40, or 60))
Of course the program needs to scan the file to look for a parenthesis. Everytime, it sees one, put that value into a different column, performs the calculation and prints the output.
I hope you get the idea.
You are appreciated.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to search a pattern inside a zipped file ie (.gz file) with out unzipping it?
using grep command..
Bit urgent.. pls..help me (2 Replies)
Discussion started by: senraj01
2 Replies
2. Shell Programming and Scripting
Hi All,
I'm new to perl,
My requirement is to check if particular file exists.
e.g. filename.txt, filename1.txt, filename2.txt etc
I tried the below code:-
my $var1 = "filename.txt"
if ( -e ($var1 = ~ /file\w/))
{
print "File found \n";
}
else
{ print "File not found \n";
}
... (0 Replies)
Discussion started by: doitnow
0 Replies
3. Programming
Hi,
I have large files with fixed length fields or fields seperated by delimeter. I would like to do validation on some or all fields to check for numeric or date or characters etc.. I would like to write this in C++. Please let me know if any one have any ideas on this.
Thanks for all... (2 Replies)
Discussion started by: rameshmelam
2 Replies
4. Shell Programming and Scripting
I need scan through some files, then open the file one by one and scan inside the file using perl to see if it contain a start tag and end tag which the end tag is the mirror image of the start tag, the start tag and end tag only have 5 char. And inside the file there is "http://". It is just a... (5 Replies)
Discussion started by: blueblur
5 Replies
5. Shell Programming and Scripting
hello everybody,
I have a group of file
eg-
sample1
sample2
sample3
sample4
each file contain this :-
cat sample1
SEQ_NUM,1,UPESI1
My requirement is to
change the value-UPESI1 to UPE10 in file which contain this pattern -UPESI1.
any help is appreciated. (2 Replies)
Discussion started by: abhigrkist
2 Replies
6. Shell Programming and Scripting
There are 4 files inside one folder matching criteria i.e. File name = ABCJmdmfbsjopXXXXXXX_mm-dd-yyyy_XXX.data
Here is the Code which find the files matching criteria:-
TS=`date +"%m-%d-%Y"`| for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data"`
do # Matching File Processing Code.... (1 Reply)
Discussion started by: lancesunny
1 Replies
7. Shell Programming and Scripting
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
Discussion started by: saaisiva
16 Replies
8. Shell Programming and Scripting
Hi All ,
I have some fille names in a file which are sorted according to date. for example
file1_123.log 23 Jul 0Kb
file2_123.log 22 Jul 2Kb
file3_123.log 20 Jul 0Kb
file1_456.log 24 Jul 2Kb
file2_678.log 22 Jul 0Kb
file2_678.log 21 Jul 2Kb
here 123 is a... (2 Replies)
Discussion started by: LoneRanger
2 Replies
9. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
10. UNIX for Beginners Questions & Answers
Hi all,
I have files and have a missing record. I need copy the existing record and mark those values up. For example in the below file 11048 is missing. I need to copy 22001 and copy those create the values for 11048. I have 120 set of files and I need to do that on all files.
Note the... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies
LEARN ABOUT MINIX
ppmtopgm
ppmtopgm(1) General Commands Manual ppmtopgm(1)
NAME
ppmtopgm - convert a portable pixmap into a portable graymap
SYNOPSIS
ppmtopgm [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces a portable graymap as output. The output is a "black and white" rendering of the original
image, as in a black and white photograph. The quantization formula used is .299 r + .587 g + .114 b.
Note that although there is a pgmtoppm program, it is not necessary for simple conversions from pgm to ppm , because any ppm program can
read pgm (and pbm ) files automatically. pgmtoppm is for colorizing a pgm file. Also, see ppmtorgb3 for a different way of converting
color to gray. And ppmdist generates a grayscale image from a color image, but in a way that makes it easy to differentiate the original
colors, not necessarily a way that looks like a black and white photograph.
QUOTE
Cold-hearted orb that rules the night
Removes the colors from our sight
Red is gray, and yellow white
But we decide which is right
And which is a quantization error.
SEE ALSO
pgmtoppm(1),ppmtorgb3(1),rgb3toppm(1),ppmdist(1),ppm(5),pgm(5)
AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
10 April 2000 ppmtopgm(1)