print variable length text from the middle of a line?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers print variable length text from the middle of a line?
# 8  
Old 02-05-2012
The line that you are trying snarf from, does it have a closing span tag before the opening span that you are looking for? If that is the case, then that's why my suggestion didn't work. I still don't understand the message when you tried Bartus11's suggestion -- that's odd or I'm missing something obvious.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Views How to replace a CRLF char from a variable length file in the middle of a string in UNIX?

My sample file is variable length, with out any field delimiters. It has min of 18 chars length and the 'CRLF' is potentially between 12-14 chars. How do I replace this with a space? I still want to keep end of record, but just want to remove these new lines chars in the middle of the data. ... (7 Replies)
Discussion started by: chandrath
7 Replies

2. Shell Programming and Scripting

Find line then evaluate text on next line, print when condition is met

Hello, I am looking for a specific situation in a text file. The conditions are, > <CompoundName> InChI=1S/C5H12NO2/c1-5(2)4-8-6(3)7/h5H,4H2,1-3H3/q+1 I am looking for cases where the line "> <CompoundName>" is followed by a line that contains the string "InChI=" without regard to... (5 Replies)
Discussion started by: LMHmedchem
5 Replies

3. UNIX for Dummies Questions & Answers

Help with awk, where line length and field position are variable

I have several questions about using awk. I'm hoping someone could lend me a hand. (I'm also hoping that my questions make sense.) I have a file that contains pipe separated data. Each line has similar data but the number of fields and the field position on each line is variable. ... (3 Replies)
Discussion started by: Cheese64
3 Replies

4. Shell Programming and Scripting

changing a variable length text to a fixed length

Hi, Can anyone help with a effective solution ? I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces. The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
7 Replies

5. Shell Programming and Scripting

Inserting a line when its length is variable

Hi Unix experts I have simple text files in which the number of lines vary from one file to another. They look like the following: # # . . 34 46 76 72 39 68 I want to grab the first number of the last line of each file (let's say A= 39 in the above example), which is... (2 Replies)
Discussion started by: nxp
2 Replies

6. Shell Programming and Scripting

Search text from a file and print text and one previous line too

Hi, Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11 Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
6 Replies

7. Shell Programming and Scripting

print any required line by its line no using awk and its NR variable

how to print any required line by its line no using awk and its NR variable for eg: ------------ 121343 adfdafd 21213sds dafadfe432 adf.adf%adf --------------- requied o/p if give num=3 it print: 21213sds -------------------------------------- (2 Replies)
Discussion started by: RahulJoshi
2 Replies

8. Shell Programming and Scripting

Script to add a single line to middle of text file.

I've got a configuration file that is filled with xml text statements for example: <...../> <...../> <...../> <data id="java-options" value="-server -Djava.security.policy..../> <...../> <...../> <...../> I want to write a korn shell script that will go to this specific line and add a... (2 Replies)
Discussion started by: progkcp
2 Replies

9. Shell Programming and Scripting

How to insert text into first line of the file and middle of the file?

Script 1 Pre-requisites Create a file with x amount of lines in it, the content of your choice. Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
Discussion started by: ali hussain
3 Replies

10. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies
Login or Register to Ask a Question
s_curl(3rheolef)						    rheolef-6.1 						  s_curl(3rheolef)

NAME
s_curl -- curl-like operator for the Stokes stream function computation SYNOPSIS
form(const space M, const space& V, "s_curl"); DESCRIPTION
Assembly the form associated to the s_curl operator on a finite element space V: / | b(xi,u) = | u.s_curl(xi) dx | / Omega The M and V space may be a either P1 or P2 finite element space. The M space is scalar-valued while the V is vector-valued. See also form(2) and space(2). For cartesian coordinate systems, this form coincide with the usual "curl" one (see curl(3)). In the axisymmetric case: / | (d xi d xi ) b(xi,u) = | (---- ur - ---- uz) r dr dz | (d z d r ) / Omega The b form is denoted as "s_curl", for Stokes stream function computation (see s_grad_grad(3)) as it is closely related to the "curl" oper- ator (see curl(3)), but differs by the r and 1/r factors, as: ( d (r xi) d xi ) curl(xi) = ( (1/r) -------- ; - -----) ( d r d z ) while ( d xi d xi ) s_curl(xi) = ( ---- ; - ---- ) ( d r d z ) Notice also that the differentiation is performed on the xi variable here: b(xi,u)=(s_curl(xi),u) while the "curl" form brings the differ- entiation on the u vector-valued variable: (curl(u),xi), i.e. a transpose formulation. ORIENTATION AND SIGN FIX
The (r,theta,z) coordinate system has positive orientation, thus (z,r,theta) and (z,r) are positive also. But (r,z,theta) and (r,z) are negative : the sign of s_curl is then inverted to obtain the same result as if (z,r) was used. EXAMPLE
The following piece of code build the form associated to the P1 approximation: geo g("square"); space M(g, "P1"); space V(g, "P1", "vector"); form a(M, V, "s_curl"); SEE ALSO
form(2), space(2), curl(3), s_grad_grad(3), curl(3) rheolef-6.1 rheolef-6.1 s_curl(3rheolef)