Sponsored Content
Top Forums UNIX for Beginners Questions & Answers To remove any invisible and special characters from the file(exclude @!#$&*) Post 303030197 by rakeshp on Thursday 7th of February 2019 05:19:19 AM
Old 02-07-2019
To remove any invisible and special characters from the file(exclude @!#$&*)

Hi Guys,

My requirement is to remove any invisible and special characters from the file like control M(carriage return) and alt numerics and it should not replace @#!$%

abc|xyz|acd¥£ó
adc|123| 12áí

Please help on this.

Thanks
Rakesh
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Identifying invisible characters in Unix file

I have a file, which when you look at it, appears as if it has spaces.... But sometimes, it is has tab or Nulls or some other character which we are not able to see..... How to find what character exactly it is in the file, where ever we are seeing a space... (Iam in solaris)... (1 Reply)
Discussion started by: thanuman
1 Replies

2. 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

3. Shell Programming and Scripting

Remove special characters from text file

Hi All, i am trying to remove all special charecters().,/\~!@#%^$*&^_- and others from a tab delimited file. I am using the following code. while read LINE do echo $LINE | tr -d '=;:`"<>,./?!@#$%^&(){}'|tr -d "-"|tr -d "'" | tr -d "_" done < trial.txt > output.txt Problem ... (10 Replies)
Discussion started by: kkb
10 Replies

4. 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

5. Solaris

How to remove a directory or file with special characters in Solaris

I finally figured out how to remove a file or directory with special characters in the name. It's kind of rudimentary so I thought I would share it with everyone: find .inum -exec rm -rf {} \; (7 Replies)
Discussion started by: jastanle84
7 Replies

6. Shell Programming and Scripting

Read file and remove special characters or strings

Hello all I am getting data like col1 | col2 | col3 asdafa | asdfasfa | asf*&^sgê 345./ |sdfasd23425^%^&^ | sdfsa23 êsfsfd | sf(* | sdfsasf My requirement is like I have to to read the file and remove all special characters and hex characters ranging form 00-1f from 1st column, remove %"'... (1 Reply)
Discussion started by: vasuarjula
1 Replies

7. Shell Programming and Scripting

remove the special characters and move the file into another server

(5 Replies)
Discussion started by: number10
5 Replies

8. UNIX for Advanced & Expert Users

What my puzzle file!, How to remove special characters ??

My application generate file but it have special characters in these file. I would like to clear special characters by vi editor and not use cat /dev/null > to_file I try to remove characters manually, but I'm can not! root@MyHost /tmp> ls -l puzzle.txt -rw-r--r-- 1 root system ... (5 Replies)
Discussion started by: arm_naja
5 Replies

9. Shell Programming and Scripting

How to remove alphabets/special characters/space in the 5th field of a tab delimited file?

Thank you for 4 looking this post. We have a tab delimited file where we are facing problem in a lot of funny character. I have tried using awk but failed that is not working. In the 5th field ID which is supposed to be a integer only of that file, we are getting corrupted data as below. I... (12 Replies)
Discussion started by: Srithar
12 Replies

10. UNIX for Advanced & Expert Users

To remove any invisible and special characters from the file(exclude @#!$*)

Hi Guys, My requirement is to remove any invisible and special characters from the file like control M(carriage return) and alt numerics and it should not replace @#!$% abc|xyz|acd¥£ó adc|123| 12áí Please help on this. Thanks Rakesh (1 Reply)
Discussion started by: rakeshp
1 Replies
BBCODE_ADD_SMILEY(3)							 1						      BBCODE_ADD_SMILEY(3)

bbcode_add_smiley - Adds a smiley to the parser

SYNOPSIS
bool bbcode_add_smiley (resource $bbcode_container, string $smiley, string $replace_by) DESCRIPTION
Adds a smiley to the parser PARAMETERS
o $bbcode_container - BBCode_Container resource, returned by bbcode_create(3). o $smiley - The string that will be replaced when found. o $replace_by - The string that replace smiley when found. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 bbcode_add_smiley(3) usage example <?php /* * Prepare the rule set */ $arrayBBCode=array( ''=> array('type'=>BBCODE_TYPE_ROOT, 'childs'=>'!i'), 'b'=> array('type'=>BBCODE_TYPE_NOARG, 'open_tag'=>'<b>', 'close_tag'=>'</b>'), 'u'=> array('type'=>BBCODE_TYPE_NOARG, 'open_tag'=>'<u>', 'close_tag'=>'</u>', 'flags'=>BBCODE_FLAGS_SMILEYS_OFF), 'i'=> array('type'=>BBCODE_TYPE_NOARG, 'open_tag'=>'<i>', 'close_tag'=>'</i>', 'childs'=>'b'), ); /* * Parsed Text */ $text=<<<EOF [i] No parse Test [/i] :) [b] Parsed, with smiley :( [/b] [u] Parsed, with no smiley :D [/u] EOF; /* * Init the parser */ $BBHandler=bbcode_create($arrayBBCode); /* * Add Smiley rules to parser */ bbcode_add_smiley($BBHandler, ":)", "<img src="smiley.gif" alt=":)" />"); bbcode_add_smiley($BBHandler, ":(", "<img src="sad.gif" alt=":(" />"); bbcode_add_smiley($BBHandler, ":D", "<img src="happy.gif" alt=":D" />"); bbcode_add_smiley($BBHandler, ":p", "<img src="tong.gif" alt=":p" />"); bbcode_add_smiley($BBHandler, ":|", "<img src="special.gif" alt=":|" />"); bbcode_add_smiley($BBHandler, ":6:", "<img src="six.gif" alt=":6:" />"); /* * Parse the text */ echo bbcode_parse($BBHandler,$text); ?> The above example will output: <i> No parse Test </i> <img src="smiley.gif" alt=":)" /> <b> Parsed, with smiley <img src="sad.gif" alt=":(" /> </b> <u> Parsed, with no smiley :D </u> PHP Documentation Group BBCODE_ADD_SMILEY(3)
All times are GMT -4. The time now is 09:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy