Sponsored Content
Top Forums UNIX for Dummies Questions & Answers extracting text and reusing the text to rename file Post 302282138 by JohnDS on Friday 30th of January 2009 08:02:57 AM
Old 01-30-2009
Hi Tytalus,
thank you for the quick response but it doesn't seem so work. (I might be doing something wrong, since I'm just starting to try this kind of stuff)
The filename has been renamed, but it takes the first line in the file.
Therefore I attached the actual ps file.
What I forgot to mention is that the filename itself is also variable, so I was wondering whether your solution would work as well with the *.ps in stead of the file.ps?

best regards,
John

PS indeed the underscores are a better solution
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting a line in a text file

If my file looks like this…. 10 20 30 and I want to take each line individually and put it in a variable so it can be read later in it's on individual test statement, how can I do that? I guess what I'm asking is how can I extract each line individually. Thanks (5 Replies)
Discussion started by: terryporter51
5 Replies

2. Shell Programming and Scripting

Extracting specific text from a file

Dear All, I have to extract a a few lines from a log file and I know the starting String and end string(WHich is same ). Is there any simplere way using sed - awk. e.g. from the following file -------------------------------------- Some text Date: 21 Oct 2008 Text to be extracted... (8 Replies)
Discussion started by: rahulkav
8 Replies

3. Shell Programming and Scripting

extracting part of a text file

Hi guys So I have a very large log file where each event is logged along with the time that it occurred. So for e.g. The contents of the file look like: ... 12:00:07 event 0 happened. 12:01:01 event 1 happened. 12:01:05 event 2 happened. 12:01:30 event 3 happened. 12:02:01 event 4... (10 Replies)
Discussion started by: alinaqvi90
10 Replies

4. UNIX for Dummies Questions & Answers

Extracting the last column of a text file

I would like to extract the last column of a text file but different rows of the text file have different numbers of columns. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

5. Shell Programming and Scripting

help extracting text from file

Hello I have a large file with lines beginning with 552, 553, 554, below is a small sample, I need to extract the data you can see below highlighted in bold from this file on the same location on every line and output it to a new file. Thank you in advance for any help 55201KL... (2 Replies)
Discussion started by: firefox2k2
2 Replies

6. Shell Programming and Scripting

Extracting text from within a section of text using AWK

I have a command which returns the below output. How can I write a script to extract mainhost and secondhost from this output and put it into an array? I may sometimes have more hosts like thirdhost. I am redirecting this output to a variable. So I guess there should be a awk or sed command to... (7 Replies)
Discussion started by: heykiran
7 Replies

7. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. Shell Programming and Scripting

Extracting and copying text from one file to another

Helooo, So I have a .fasta file (a text file with sequence data) which looks like this, with just over 3 million lines of data. >TCONS_00000001 gene=XLOC_000001 AATTGTGGTGAAATGACTTCTGTTAACGGAGACATCGATGATTGTTGTTACTATTTGTTCTCAGGATTCA... (8 Replies)
Discussion started by: 4galaxy7
8 Replies

9. Shell Programming and Scripting

Rename files based on name in text file

Hello, I have a text file "file.list" with the contents below. file1 filename1 file2 filename2 file3 filename3 file1, file2 and file3 are files existing in the same directory as the text file file.list. I want to rename file1 to filename1, file2 to filename2, as show in the text... (1 Reply)
Discussion started by: james2009
1 Replies

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 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)
All times are GMT -4. The time now is 05:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy