05-13-2013
Nice solution.
You could change v like this v="ABCDEFGHIJKLMNOPQRSTUVWXYZA"
And then use split(v,A,"")
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies
2. Shell Programming and Scripting
Hi All,
I have a big log file i want to delete all characters (between 350th to 450th characters) starting at 350th character position to 450th character position.
please advice or sample code. (6 Replies)
Discussion started by: rajeshorpu
6 Replies
3. UNIX for Advanced & Expert Users
I want to know how to, given a string like W87151WR71C, if the 4th and 5th character (in this case 15) are greater than 45, then to add 1 to the 3rd character (in this case 7) and assign the revised string the variable name MODSTRING.
Thanks in advance. This is ultimately to grab info from... (6 Replies)
Discussion started by: glev2005
6 Replies
4. Shell Programming and Scripting
hello all
i request you to give the solution for the following problem..
I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print
g
go
goo
goog
googl
google
like this Using unix Shell scripting...
without using... (1 Reply)
Discussion started by: samupnl
1 Replies
5. Shell Programming and Scripting
Hi All,
Was wondering how I can do the following....
I have a String as follows
"ACCTRL000005022RRWDKKEEDKDD...."
This string can be in a file called tail.out or in a Variable called $VAR2
Now I have another variable called $VAR1="000004785" (9 bytes long), I need the content of... (5 Replies)
Discussion started by: mohullah
5 Replies
6. Shell Programming and Scripting
i have a reqirement to adjust the data in a file based on a perticular character
the sample data is as below
483PDEAN CORRIGAN 52304037528955WAGES 50000
89BP ABCD MASTER352 5434604223735428 4200
58BP SOUTHERN WA848 ... (1 Reply)
Discussion started by: pema.yozer
1 Replies
7. Shell Programming and Scripting
Hello,
I do have folders containing having funny strings in their names and one space.
First, I do remove the funny strings and replace the space by an underscore.
find . -name '* *' | while read file;
do
target=`echo "$file" | sed 's/... (2 Replies)
Discussion started by: tempestas
2 Replies
8. Shell Programming and Scripting
Hi friend,
I have one file , and i want to read that file character by character.
I need this script in ksh.
while using read option with -n1 am getting error.
while read -n1 c read has bad option
And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies
9. UNIX for Advanced & Expert Users
hello
i have file with 100k records and each one has certain value that starts at 28th column and certain value that starts at 88th column
e.g. 1st file
<25>1234567 ..... <88> 8573785485
i have aditional file with values which are related to value that starts at 88th column of the... (1 Reply)
Discussion started by: dell1520
1 Replies
10. Shell Programming and Scripting
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
bamg(1rheolef) rheolef-6.1 bamg(1rheolef)
NAME
bamg - bidimensional anisotropic mesh generator
SYNOPSIS
bamg options -g input[.bamgcad] -o ouput[.bamg]
EXAMPLE
bamg -g toto.bamgcad -o toto.bamg
OUTLINE OF THE COMMANDS
This software can
create a mesh from a geometry
adapt a mesh from a background mesh using a metric or solution file
do smoothing
to make quadrilaterals and to split internal edge with 2 boundary vertices in an existing mesh (in this case the metric is use to
change the definition of the element's quality).
construct
just a metric file, if you have an other mesher
do the P1 interpolation
of the solution on another mesh:
CREATE A MESH FROM A GEOMETRY
input file with -g filename (file type DB mesh).
output file arguments -oxxxx filename where xxxx is the type of output file (see below for more details).
smoothing, quad, utility and other parameters.
In addition, metric specication may be prescribed with the help of -M filename argument (file type Metric). All the options are
described below.
ADAPT A MESH FROM A BACKGROUND MESH USING A METRIC OR SOLUTION FILE
input files -b filename where the suffixe of the file define the type of the file `.amdba', `.am_fmt', `.am', `.ftq', `.nopo' and other-
wise the file is a BD mesh file.
input `-M filename' (file type Metric) or -MBB filename or -Mbb filename (solution file type BB or bb).
metric control parameters, -err val, -errg val,....
output file arguments reqired
interpolation, smoothing, quad,
utility parameter, and other parameter do smoothing, to make quadrilaterals: and to split internal edge with 2 boundary vertices in
an existing mesh (in this case the metric is use to change the definition of the element's quality).
input files -r filename(file type DB mesh).
-M filename
(file type Metric).
output file -o filename (file type DB mesh).
some other parameter:
@table @code
-thetaquad val:
to create quad with 2 triangles
-2: to create the submesh with mesh size h = h/2
-2q: to split all triangles in 3 quad. and to split all quad. in 4 quad.
-NbSmooth ival:
to change the number of smoothing iteration (3 by default if the metric eld is set with arguments : -M or -Mbb, 0 otherwise.
... @end table construct just a metric file, if you have an other mesher:
input files -r filename (file type DB mesh).
--Mbb filename
or -MBB filename
+ all the arguments
of the metric construction
output file -oM filename (file type Metric). do the P1 interpolation of the solution on another mesh:
input files -r filename (file type DB mesh).
--rBB filename
or -rbb filename
output file -wBB filename or -wbb filename
METRIC COMPUTATIOB OPTIONS
These options are relevant when computing a metric from a scalar field provided in a .bb file. Notice that, when providing a tensor metric
in the .bb file, the metric computation is not performed and these options are not relevent.
-RelError
compute the metric with a relative error. This is the default.
-CutOff float
the cut-off value used for the relative error criteria. Default value is 1e-5.
-AbsError
compute the metric with a relative error
rheolef-6.1 rheolef-6.1 bamg(1rheolef)