I am trying to send a regex with pipes to do a
'pattern OR pattern OR ...'
with 'pattern | pattern | ...'
for example with one replacement :
with
I expect to :
1 ) register an array A with $2 as content and $1 as key
so in the fist line
$2 =' tutu | tata | tonton | titi '
$1 = ' toto '
2 ) replace with gsub(/$2/,$1)}1
so in the fist line
awk 'IGNORECASE = 1 {gsub(/ tutu | tata | tonton | titi /," toto ")}1
actualy i am looking to -f option
Is that a good idea ?
I am thinking about doing
What coold I do ?
Hi there,
We have been given a bit of coursework using awk on html pages. Without giving too much away and risking the wrath of the plagerism checks, I can say we need to deal with certain html elements.
There may be several of these elements on one line. My question is, if there are more... (1 Reply)
This should be somewhat simple, but I need some help with this one.
I have a bunch of files with tags on the end like so...
Filename {tag1}.ext
Filename2 {tag1} {tag2}.ext
I want to hold in a variable just the filename with all the " {tag}" removed. The tag can be anything so I'm looking... (4 Replies)
Hi,
I am using sub to remove blank spaces and one pattern(=>) from the input string. It works fine when I am using two sub functions for the same. However it is giving error while I am trying to remove both spaces and pattern using one single sub function.
Working:
$ echo " OK => " |awk... (2 Replies)
Hi Bigshots,
I have a pattern file with two columns. I have another data file. If column 1 in the pattern file appears as the 4th column in the data file, I need to replace it (4th column of data file) with column 2 of the pattern file. If the pattern is found in any other column, it should not... (6 Replies)
Hi Team
I have the following text in one of the file
j1738-abc-system_id(in.value1)-2838 G566-deF-system_id(in.value2)-7489
I want to remove system_id(...) combination completely The output should look like this
j1738-abc-in.value1-2838 G566-deF-in.value2-7489
Any help is appreciated... (4 Replies)
Hi forum,
Can you please help me understand how to look for and replace the below pattern (containing line breaks) and return a new result?
Rules: Must match the 3 line pattern and return a 1 line result.
I have found solutions with sed, but it seems that sed installed in my system is... (5 Replies)
I need to check if 2 values exists in the file and if they are equal print 0.
output.txt:
------------
1 2 3 4 5 6
Inputs:
a=1
b=2
My pattern matching code works but I am trying to set a counter if both the pattern matches which does not work.If the count > 0,then I want to... (3 Replies)
I am able to grep multiple patterns which stored in a files. However, how could we replace the whole line with either the pattern or new string?
For example:
pattern_file: *Info in the () is not part of the pattern file. They are the intended name to replace the whole line after the pattern... (5 Replies)
Discussion started by: wxboo
5 Replies
LEARN ABOUT DEBIAN
msh2geo
msh2geo(1rheolef) rheolef-6.1 msh2geo(1rheolef)NAME
msh2geo - convert gmsh mesh in geo format
SYNOPSIS
msh2geo [-zr|-rz] input[.msh] > output.geo
DESCRIPTION
Convert a gmsh `.msh' into `.geo' one. The output goes to standart output. See the gmsh documentation for a detailed description of the
`.mshcad' input file for gmsh.
EXAMPLES
gmsh -2 toto.mshcad -o toto.msh
msh2geo toto.msh > toto.geo
gmsh -2 -order 2 toto.mshcad -o toto2.msh
msh2geo toto2.msh > toto2.geo
COORDINATE SYSTEM OPTION
Most of rheolef codes are coordinate-system independant. The coordinate system is specified in the geometry file `.geo'.
-zr
-rz the 2d mesh is axisymmetric: zr (resp. rz) stands when the symmetry is related to the first (resp. second) coordinate.
NOTES
Pk triangle, when k>=5, may have internal nodes renumbered: from the
GMSH DOCUMENTATION
The nodes of a curved element are numbered in the following order:
the element principal vertices;
the internal nodes for each edge;
the internal nodes for each face;
the volume internal nodes.
The numbering for face and volume internal nodes is recursive,
i.e., the numbering follows that of the nodes of an embedded face/volume.
The higher order nodes are assumed to be equispaced on the element.
In rheolef, internal triangle nodes are numbered from left to right and then from bottom to top. The numbering differ for triangle when k
>= 5. Thus, msh2geo fix the corresponding internal nodes numbering during the conversion.
Pk tetrahedrons and hexaedrons in gmsh and rheolef has not the same edge-node order nd orientation. E.g. for tetrahedrons, edges 13 and 23
should be swaped and reoriented as 32 and 31. Thus, msh2geo fix the corresponding internal nodes numbering.
TODO
Fix for P3-tetra: swap edges orientations for 3,4,5 and swap faces 1 and 2. Check P4(T) for face orientation. Perform face visualisation
with gnuplot face fill.
See also hexa edges orient and faces numbers and orient.
Check that node are numbered by vertex-node, then edge-node, then face(tri,qua)-node and then volume(T,P,H)-node. Otherwise, renumber all
nodes.
Support for high order >= 6 element ? not documented in gmsh, but gmsh supports it at run
rheolef-6.1 rheolef-6.1 msh2geo(1rheolef)