Sponsored Content
Top Forums Shell Programming and Scripting sed delete pattern with special characters Post 302352717 by stinkefisch on Sunday 13th of September 2009 03:51:01 AM
Old 09-13-2009
sed delete pattern with special characters

Hi all,

I have the following lines

<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)

and I would like to get

A gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
B gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
J gtwrhwrthwr text hghthwrhtwrtw ; text text (text)

I'd like to get the <b> in the front and all this </b><font color='#06C'> deleted.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to delete a file with special characters

I don't now exactly how I did it, but I created a file named " -C " cexdi:/home1 $ls -lt total 1801336 -rw------- 1 cexdi ced-group 922275840 23 mars 10:03 -C How do I delete this file ? cexdi:/home1 $rm -C rm: invalid option -- C Syntax : rm filename ... Doesn't work...... (5 Replies)
Discussion started by: yveslagace
5 Replies

2. Shell Programming and Scripting

NAWK - seach pattern for special characters - } dbl qt - sng qt

i'm puzzled.... trying to look for the pattern }"'. but the below code returns to me the message below (pattern is curley queue + dbl qt + sng qt + period) nawk -v pat="\}\"\'\."' { if (match($0, pat)) { before = substr($0,1,RSTART-1); ... (11 Replies)
Discussion started by: danmauer
11 Replies

3. Shell Programming and Scripting

sed with special characters

Hi, I am reading a file (GC_JAR.log) which has entries like: 511725.629, 0.1122672 secs] 525268.975, 0.1240036 secs] 527181.835, 0.2068215 secs] 527914.287, 0.2884801 secs] 528457.134, 0.2548725 secs] I want to replace all the entries of "secs]" with just "secs" Thus, the output... (4 Replies)
Discussion started by: itzz.me
4 Replies

4. Shell Programming and Scripting

awk search pattern with special characters passed from CL

I'm very new to awk and sed and I've been struggling with this for a while. I'm trying to search a file for a string with special characters and this string is a command line argument to a simple script. ./myscript "searchpattern" file #!/bin/sh awk "/$1/" $2 > dupelistfilter.txt sed... (6 Replies)
Discussion started by: cue
6 Replies

5. Shell Programming and Scripting

how to delete special characters from the file content

Hello Team, Any one suggest how to delte the below special character from a file which is having one column 10 rows of same below content. ---------------------------------------- Kosten|bersicht gemd_ ' =Welche Kosten kvnnen... (2 Replies)
Discussion started by: kanakaraju
2 Replies

6. Shell Programming and Scripting

SED equivalent for grep -w -f with pattern having special characters

I'm looking for SED equivalent for grep -w -f. All I want is to search a list of patterns from a file. Also If the pattern doesn't match I do not want "null returned", rather I would prefer some text as place holder say "BLANK LINE" as I intend to process the output file based on line number. ... (1 Reply)
Discussion started by: novice_man
1 Replies

7. Shell Programming and Scripting

Sed or awk : pattern selection based on special characters

Hello All, I am here again scratching my head on pattern selection with special characters. I have a large file having around 200 entries and i have to select a single line based on a pattern. I am able to do that: Code: cat mytest.txt | awk -F: '/myregex/ { print $2}' ... (6 Replies)
Discussion started by: usha rao
6 Replies

8. Shell Programming and Scripting

Delete special characters

My sed is not working on deleting the entire special characters and leaving what is necessary.grep connections_per a|sed -e 's/\<\!\-\-//g' INPUT: <!-- <connections_per_instance>1</connections_per_instance> --> <method>HALF</method> <!--... (10 Replies)
Discussion started by: kenshinhimura
10 Replies

9. UNIX for Advanced & Expert Users

Need help to delete special characters exists only at the end of the each record in UNIX file?

Hi, I have a file in unix with 15 columns.It consists special characters(#,$,^M,@,*,% etc)at the end of the each record.I want to remove these special characters.I used the following: Sed -e 's/ /g;s/ */ /g' . But It is removing special characters exists everywhere in the file(begining,middle... (24 Replies)
Discussion started by: rakeshp
24 Replies

10. UNIX for Beginners Questions & Answers

Replace Pattern with another that has Special Characters

Hello Team, Any help would be much appreciated for the below scenario: I have a sed command below where I am trying to replace the contents of 'old_pkey' variable with 'new_pkey' variable in a Soap request file (delete_request.txt). This works fine for regular string values, but this new_pkey... (8 Replies)
Discussion started by: ChicagoBlues
8 Replies
DwtCSTextGetEditable(3Dwt)												DwtCSTextGetEditable(3Dwt)

Name
       DwtCSTextGetEditable  - Obtains the current edit permission state indicating whether the user can edit the text in the compound-string text
       widget.

Syntax
       Boolean DwtCSTextGetEditable(widget)
	    Widget widget;

Arguments
       widget	 Specifies the ID of the compound-string text widget.

Description
       The DwtCSTextGetEditable function returns the current edit-permission-state, which indicates whether the user can edit the text in the com-
       pound-string  text  widget.   If  the  function	returns True, the user can edit the string text in the compound-string text widget.  If it
       returns False, the user cannot edit the text.

Return Values
       Specifies a boolean value that, when True, indicates the user can edit the text in the compound string text widget.  When False,  the  user
       cannot edit the text.

See Also
       DwtCSText(3Dwt),  DwtCSTextCreate(3Dwt), DwtCSTextReplace(3Dwt), DwtCSTextSetString(3Dwt), DwtCSTextSetEditable(3Dwt), DwtCSTextGet-
       MaxLength(3Dwt), DwtCSTextSetMaxLength(3Dwt), DwtCSTextSetSelection(3Dwt), DwtCSTextGetSelection(3Dwt)
       Guide to the XUI Toolkit: C Language Binding
       Guide to the XUI Toolkit Intrinsics: C Language Binding

															DwtCSTextGetEditable(3Dwt)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy