Link to home
Start Free TrialLog in
Avatar of conversekid
conversekidFlag for India

asked on

remove special charaters from a .CSV file

I want a script to  remove all the special characters from a .CSV file.  Thanks in advance
Contents of the file is like follows:

WF_CRIT_INCL_CD,Übereinst. erf. (Schreibw. e.),EQ_THIS_NC,German,Common,7,N,Y,Y,
All,
WF_CRIT_INCL_CD,K.Üb.einst.mgl.(G/Kl.schr.ign),NE_ALL_NC,German,Common,8,N,Y,Y,All,
WF_CRIT_INCL_CD,Größer als,GREATER_THAN,German,Common,9,N,Y,Y,All,
WF_CRIT_INCL_CD,Kleiner als,LESS_THAN,German,Common,10,N,Y,Y,All,
WF_CRIT_INCL_CD,Zwischen,BETWEEN,German,Common,11,N,Y,Y,All
WF_CRIT_INCL_CD,Nicht zwischen,NOT_BETWEEN,German,Common,12,N,Y,Y,All
WF_CRIT_INCL_CD,Gleich Null,IS_NULL,German,Common,13,N,Y,Y,All
WF_CRIT_INCL_CD,Ungleich Null,IS_NOT_NULL,German,Common,14,N,Y,Y,All
WF_CRIT_TYPE_CD,Prozesseigenschaft,PROPERTY,German,Workflow,1,N,Y,Y,All
WF_CRIT_TYPE_CD,Task-Eigenschaft,TASK_PROPERTY,German,Taskflow,1,N,Y,Y,All
WF_CRIT_TYPE_CD,Business Component,BUSCOMP,German,Common,2,N,Y,Y,All
WF_CRIT_TYPE_CD,Applet,APPLET,German,Common,3,N,Y,Y,All
WF_CRIT_TYPE_CD,Ausdruck,EXPRESSION,German,Common,4,N,Y,Y,All
WF_DATA_TYPE_CD,String,VARCHAR,German,Common,1,N,Y,Y,All
WF_DATA_TYPE_CD,Nu
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of conversekid

ASKER

In this example there are not special characters. I just wanted to give the format. We need to find and remove all the special characters if any..
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi ,

The following are special characters:

@"?/>.<,:;""'{[}]|\\+=_-)(*&^%$#@!~`";  Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Great!  Is it possible for me to have a small script so that I can change the characters to be removed from the file?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, I definitely agree with blu's suggestion. I am trying to get it as a script so that I can give it to users.

zmo, if possible can you help me understand why we are using sed twice...and is it possible to take the input from the user as in what to remove and then remove the same....only if its easy to make it that way.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks to Zmo and blu for your quick response..!!!!!!!!!