Sponsored Content
Top Forums Shell Programming and Scripting Sed - remove special characters Post 302700603 by nakaedu on Thursday 13th of September 2012 05:57:14 PM
Old 09-13-2012
Sed - remove special characters

Hi,

I have a file with this line, it's always in the first line:

I want to remove these special characters: ´╗┐

file1
Code:
´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35 Bytes;2 ;1

I want the same file to be only
Code:
\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35 Bytes;2 ;1

I am not able to remove those chars,

Last edited by Scrutinizer; 09-13-2012 at 08:49 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

remove special and unicode characters

Hi, How do I remove the lines where special characters or Unicode characters appear? The following query does work but I wonder if there is a better way. cat test.txt | egrep -v '\)|#|,|&|-|\(|\\|\/|\.' The following lines show that my query is incomplete. Warning: The word "*Khan" is... (1 Reply)
Discussion started by: shantanuo
1 Replies

2. Shell Programming and Scripting

Remove special characters from string

Hi there, I'd like to write a script that removes any set of character from any string. The first argument would be the string, the second argument would be the characters to remove. For example: $ myscript "My name's Santiago. What's yours?" "atu" My nme's Snigo. Wh's yors? I wrote the... (11 Replies)
Discussion started by: chebarbudo
11 Replies

3. Shell Programming and Scripting

How to remove special characters from each line?

Hello, Is there a simpler way to remove special characters (color codes) from each lines in a log file? I use sed like in the example below but I think there should be a more simple way to achieve the same result: $ cat -vet file1 ^, , , , Maybe to convert the file somehow? ... (5 Replies)
Discussion started by: majormark
5 Replies

4. UNIX for Dummies Questions & Answers

How to Remove Special Characters

Dear Members, We have a file which contains some special characters. I need to replace these special character by a new line character(\n). The Special character is \x85. I am not sure what this character means and how we can remove it. Any inputs are greatly appreciated. Thanks... (5 Replies)
Discussion started by: sandeep_1105
5 Replies

5. Shell Programming and Scripting

remove special characters

hello all I am writing a perl code and i wish to remove the special characters for text. I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command s/specialcharacters/null/g I really want to code like... (3 Replies)
Discussion started by: vasuarjula
3 Replies

6. Shell Programming and Scripting

Remove string between two special characters

Hi All, I have a variable like AVAIL="\ BACK:bkpstg:testdb3.iad.expertcity.com:backtest|\ #AUTH:authstg:testdb3.iad.expertcity.com:authiapd|\ TEST:authstg:testdb3.iad.expertcity.com:authiapd|\ " What I want to do here is that If a find # before any entry, remove the entire string... (5 Replies)
Discussion started by: engineermayur
5 Replies

7. Shell Programming and Scripting

sed or tr to remove specific group of special characters

Hi, I have a input of the form: ..., word1, word2, word3... I want out put of the form word1, word2, word3 I tried echo '..., word1, word2, word3...' | tr -d '...,' but that takes out the commas in the middle too so I get word1 word2 word3 but I want the commas in the middle. ... (3 Replies)
Discussion started by: forumbaba
3 Replies

8. Shell Programming and Scripting

How to remove some special characters in a string?

Hi, I have string like this ="Lookup Procedure" But i want the output like this Lookup Procedure =," should be removed. Please suggest me the solution. Regards, Madhuri (2 Replies)
Discussion started by: srimadhuri
2 Replies

9. Shell Programming and Scripting

How to remove special characters?

Hi Gurus, I have file which contains some unicode charachator like "ü". I want to replace it with some charactors. I searched in internet and got command sed "s/ü/-/g", but I don't know how to type ü in unix command line. Please help me for this one. Thanks in advance (7 Replies)
Discussion started by: ken6503
7 Replies

10. Shell Programming and Scripting

Remove Special Characters Within Text

Hi, I have a "|" delimited file that is exported from a database. There is one column in the file which has description/comments entered by some application user. It has "Control-M" character and "New Line" character in between the text. Hence, when i export the data, this record with the new... (4 Replies)
Discussion started by: tarun.trehan
4 Replies
CAIRO_ARC_NEGATIVE(3)							 1						     CAIRO_ARC_NEGATIVE(3)

CairoContext::arcNegative - Adds a negative arc

       Object oriented style (method):

SYNOPSIS
public void CairoContext::arcNegative (float $x, float $y, float $radius, float $angle1, float $angle2) DESCRIPTION
Procedural style: void cairo_arc_negative (CairoContext $context, float $x, float $y, float $radius, float $angle1, float $angle2) Adds a circular arc of the given $radius to the current path. The arc is centered at ($x, $y), begins at $angle1 and proceeds in the direction of decreasing angles to end at $angle2. If $angle2 is greater than $angle1 it will be progressively decreased by 2*M_PI until it is less than $angle1. See CairoContext::arc or cairo_arc(3) for more details. This function differs only in the direction of the arc between the two angles. PARAMETERS
o $context - A valid CairoContext object o $x - double x position o $y - double y position o $radius - The radius of the desired negative arc o $angle1 - Start angle of the arc o $angle2 - End angle of the arc RETURN VALUES
No value is returned. EXAMPLES
Example #1 Object oriented style <?php $s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100); $c = new CairoContext($s); $c->setSourceRgb(0, 0, 0); $c->paint(); $c->setLineWidth(1); $c->setSourceRgb(1, 1, 1); for ($r = 50; $r > 0; $r -= 10) { $c->arcNegative(50, 50, $r, 2 * M_PI, 0); $c->stroke(); $c->fill(); } $s->writeToPng(dirname(__FILE__) . '/CairoContext__arcNegative.png'); ?> Example #2 Procedural style <?php $s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100); $c = cairo_create($s); cairo_set_source_rgb($c, 0, 0, 0); cairo_paint($c); cairo_set_source_rgb($c, 1, 1, 1); cairo_set_line_width($c, 1); for ($r = 50; $r > 0; $r -= 10) { cairo_arc_negative($c, 50, 50, $r, 2 * M_PI, 0); cairo_stroke($c); cairo_fill($c); } cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_arc_negative.png'); ?> SEE ALSO
CairoContext::arc. PHP Documentation Group CAIRO_ARC_NEGATIVE(3)
All times are GMT -4. The time now is 01:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy