Hello, I am trying to get an output from awk and have been unsuccessful so far.
There is an input file which contains certain segments, that needs to be read and append with another data after matching the segment...
Input file is as shown below
I am trying to get the output as
My Unix shell script is reading first the AK1 segment from the original file,gets 3525 and lookup in another file where it gets 1234 now all I need is to append this new number (1234) to 3525. Here is what the awk script looks like
This DEL_NUM will contain the 1234, 5679, 3436 and 8759.
I have two questions:
(Q1) I am using a loop and want to print a particular field of a table using the AWK command by accessing one row at a time by validating NR with the loop counter. I am using a command like this but it isn't working!
count=1
NAWK -F"|" -v var=$count 'NR == var { printf... (13 Replies)
Hi,
I have a fixed with file, which have almost 10 records
Sample File:
------------
AR 100 TTT
BC 200 SSS
DA 199 YYY
AR 500 RRR
PO 300 QQQ
PB 800 PPP
PC 150 OOO
AR 111 CCC
AD 321 LLL
I Have to check for first two charactors and if its 'AR' i have to save those records to one... (3 Replies)
Hello every one
i have a very long file 'file1' like this
<K>1</K>
</Condition>
<Tariff>Rate
<Price>1.27</Price>
<Interval>30</Interval>
</Tariff>
</Node>
<Node>NonFaF
<Tariff>Rate
<Price>1.9</Price>
<Interval>30</Interval>
</Tariff>
</Node>
</Node>
</Node>
<Node>FaF (9 Replies)
Hi All,
I need to pick up data on both sides of "=" sign.
For eg, following is the context that I have.
125.156.125.147=machine1
147.125.185.156=machine2
147.125.185.159=machine3
Can I have the ip address in one variable and machine name in another variable using sed or awk.
... (1 Reply)
Hi
I have a file, with format like:
column1|coulumn2|column3|column4
A|X|K|18
L|O|R|31,42,25
G|H|I|55,66
L|E|Q|25,31,94
output required:
column1|coulumn2|column3|column4
A|X|K|18
L|O|R|31,25
L|E|Q|25,31
Input File Format: All columns are seperated using |, last column... (8 Replies)
Hi...
I am working on script to search some records in a file based on certain fields and each record is a ASCII fixed size. I was using awk to search based on certain condition. But the length of the record is too much that awk is giving
syntax error near unexpected token `('
Request... (5 Replies)
Hi All,
I have 2 .csv files as below
File1.csv
name1,20,30,date1
name2,30,40,date1
File2.csv
name1,25,35,date1
name2,45,55,date1
Can any one help me to add the 2nd and 3rd column of file1 and file2 and write the output into a new file as below
name1,45,65,date1... (9 Replies)
Hi experts,
I have two values in the file :
For example :
partcamt = 72.90
partdamt=27.9
I need to convert these values into 6 digits and ignore the "." sign so that the desired desired output is :
total value= 0072000027900
Currently I am using the following code :
... (3 Replies)
Hi guys,
I am coding a bash script that makes use of php scripts to pull URL's from a website. These url links will have numbers in them like 0.2.3
I want to make a regex that will yield me such numbers if I use a command like preg_grep.
Question1: I need a regex that will tell my preg_grep... (2 Replies)
Discussion started by: mojoman
2 Replies
LEARN ABOUT OSX
ppmfade
PPMFADE(1) General Commands Manual PPMFADE(1)NAME
ppmfade - generate a transition between two image files using special effects.
SYNOPSIS
ppmfade [ -f first.ppm ] [ -l last.ppm ] [ -mix|-spread|-shift|-relief|-oil|-edge|-bentley|-block ] [ -base name ]
DESCRIPTION
This program generates a transition between either two input images or between one input image and black. You can use the 30 intermediate
images generated to show a smooth transition between segments of a movie. The input and output images are in the Portable Pixmap (PPM)
format. If you specify both input images, they should both be the same size. If you want to fade from black to an image, specify only the
last image. If you want to fade from an image to black, specify only the first image. ppmfade names the resulting image files base.nnnn
.ppm, where nnnn is a number varying between 0001 and 0030 and base is what you specify with via the -base option (default fade).
Another way to convert by steps from one image to another is morphing. You can use xmorph to do that.
OPTIONS -f first.ppm
This is the image file (PPM format) to be used at the beginning of the transition. If not specified, the fade will start from
black.
-l last.ppm
This is the image file (PPM format) to be used at the ending of the transition. If not specified, the fade will end with black.
-mix The two images are superimposed with the brightness of the first image decreasing from full to none and the brightness of the final
image increasing from none to full. The transition is quadratic in brightness with faster transition in the beginning and slower at
the end.
-spread
The pixels in the first image will be moved (spread) further and further from their original location and then moved into the proper
location in the final image. This is the default transition.
-shift The pixels in the first image will be shifted further and further horizontally from their original location and then moved into the
proper location in the final image.
-relief
The first image is faded to a Laplacian relief filtered version of the first image. This is then faded to a Laplacian relief fil-
tered version of the second image and finally faded to the final image.
-oil The first image is faded to an "oil transfer" version of the first image. This is then faded to an "oil transfer" version of the
second image and finally faded to the final image.
-edge The first image is faded to an edge detected version of the first image. This is then faded to an edge detected version of the sec-
ond image and finally faded to the final image.
-bentley
The first image is faded to a "Bentley Effect" version of the first image. This is then faded to a "Bentley Effect" version of the
second image and finally faded to the final image.
-block The first image is defocused to small blocks. The small blocks are converted to match a defocused version of the last image. The
block version of the last image is then focused to the final image.
-basename
This forms part of the output filenames, as described above.
EXAMPLES
ppmfade -f teapot.ppm -l pyr.ppm
Fade from teapot.ppm to pyr.ppm generating fade.0001.ppm to fade.0030.ppm using the "spread" transition.
ppmfade -l teapot.ppm
Fade from black to teapot.ppm generating fade.0001.ppm to fade.0030.ppm.
ppmfade -f teapot.ppm -base end
Fade from teapot.ppm to black generating end.0001.ppm to end.0030.ppm.
SEE ALSO tontsc(1), sgifade(1), smart_vfr(1), xmorph(1), ppm(5),
AUTHOR
Wesley C. Barris (wesb@msc.edu)
Army High Performance Computing Research Center (AHPCRC)
Minnesota Supercomputer Center, Inc.
1 April 1, 2000 PPMFADE(1)