sed or awk to replace a value in a certain line from another file containing a string
Hi experts,
In my text file I have the following alot of lines like below.
input.k is as follows.
mesh.k is as follows
or any other 3 digit number
I want to replace the 147.k of this input.k to another number from
another file mesh.k which is 100 in this case..
Required output is as follows
I used
The point is that I want to replace this
Quote:
147.k to 100.k where 100
is written in another file mesh.k , like in the other file only 100 is present or it could be 3 digit anyother number.
i know it can work with searching the line with word meshes for example and the dividing with last / and piping the data from other file but am not able to formulate the sed or awk.
I hope now you people understand what I mean. regards
Hi all,
I appreciate the enormous amount of knowledge that flows in this forum.
I am an average UNIX user. I have many files with lines like the below. I have separated each line with space for ease of reading. I need to replace the first occurance of "/00" with null on those lines that have... (6 Replies)
Source File:
abcdefghijklmnop01qrstuvwxyz
abcdefghijklmnop02qrstuvwxyz
abcdefghijklmnop03qrstuvwxyz
abcdefghijklmnop04qrstuvwxyz
abcdefghijklmnop05qrstuvwxyz
Whatever characters are in 17-18 on each line of the file, it should be concatenated to the same line at the character number... (6 Replies)
Hi Everyone,
I am new to this forum and new to sed/awk programming too !!
I need to find particular string in file1(text file) and replace it with a value from another text file(file2) the file2 has only one line and the value to be replaced with is in the second column.
file 1:
(assert (=... (21 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
hi experts,
i would like to do some html-file replacements and encounter the following problem: after cleaning up the file a bit i'd like to replace a regex with a reference and the content of another line. example:
/<title>\(*\) - Wikipedia<\/title>/
should be replaced by \1 (the title... (2 Replies)
hi experts ,
I have an input like following.
R sfst 1000.0000
$ new time step for mass scaled calculation
R dt2ms -4.000E-7
$ friction value for blank
R mue ... (10 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
LEARN ABOUT DEBIAN
mcv
mcv(1) Scotch user's manual mcv(1)NAME
mcv - mesh file converter
SYNOPSIS
mcv [options] [imfile] [omfile] [oxfile]
DESCRIPTION
The mcv program converts Scotch mesh files from and to other external file formats.
File imfile is converted into mesh file omfile, with optional geometry data being put in geometry file oxfile, if it is available.
When file names are not specified, data is read from standard input and written to standard output. Standard streams can also be explicitly
represented by a dash '-'.
When the proper libraries have been included at compile time, mcv can directly handle compressed meshes, both as input and output. A stream
is treated as compressed whenever its name is postfixed with a compressed file extension, such as in 'brol.msh.bz2' or '-.gz'. The compres-
sion formats which can be supported are the bzip2 format ('.bz2'), the gzip format ('.gz'), and the lzma format ('.lzma', on input only).
OPTIONS -h Display some help.
-iifmt Set format of input mesh file, which can be:
bnum Boeing-Harwell format. This is an elemental matrix format. Only square matrices are supported. In case the file contains sev-
eral matrices, the num parameter allow the user to provide the index of the matrix to convert, starting from 0. When the num
parameter is not set, it is assumed to be 0.
s Scotch mesh format.
-oofmt Set format of output mesh file, which can be:
s Scotch mesh format. This is the only possible choice at the time being.
-V Display program version and copyright.
EXAMPLE
Convert a Harwell-Boeing elemental mesh into a Scotch mesh.
$ mcv -ib brol.hb brol.msh
SEE ALSO mtst(1), mord(1).
Scotch user's manual.
AUTHOR
Francois Pellegrini <francois.pellegrini@labri.fr>
February 14, 2011 mcv(1)