conversekid
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,Comm on,7,N,Y,Y ,
All,
WF_CRIT_INCL_CD,K.Üb.einst .mgl.(G/Kl .schr.ign) ,NE_ALL_NC ,German,Co mmon,8,N,Y ,Y,All,
WF_CRIT_INCL_CD,Größer als,GREATER_THAN,German,Co mmon,9,N,Y ,Y,All,
WF_CRIT_INCL_CD,Kleiner als,LESS_THAN,German,Commo n,10,N,Y,Y ,All,
WF_CRIT_INCL_CD,Zwischen,B ETWEEN,Ger man,Common ,11,N,Y,Y, All
WF_CRIT_INCL_CD,Nicht zwischen,NOT_BETWEEN,Germa n,Common,1 2,N,Y,Y,Al l
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,Co mmon,14,N, Y,Y,All
WF_CRIT_TYPE_CD,Prozesseig enschaft,P ROPERTY,Ge rman,Workf low,1,N,Y, Y,All
WF_CRIT_TYPE_CD,Task-Eigen schaft,TAS K_PROPERTY ,German,Ta skflow,1,N ,Y,Y,All
WF_CRIT_TYPE_CD,Business Component,BUSCOMP,German,C ommon,2,N, Y,Y,All
WF_CRIT_TYPE_CD,Applet,APP LET,German ,Common,3, N,Y,Y,All
WF_CRIT_TYPE_CD,Ausdruck,E XPRESSION, German,Com mon,4,N,Y, Y,All
WF_DATA_TYPE_CD,String,VAR CHAR,Germa n,Common,1 ,N,Y,Y,All
WF_DATA_TYPE_CD,Nu
Contents of the file is like follows:
WF_CRIT_INCL_CD,Übereinst.
All,
WF_CRIT_INCL_CD,K.Üb.einst
WF_CRIT_INCL_CD,Größer als,GREATER_THAN,German,Co
WF_CRIT_INCL_CD,Kleiner als,LESS_THAN,German,Commo
WF_CRIT_INCL_CD,Zwischen,B
WF_CRIT_INCL_CD,Nicht zwischen,NOT_BETWEEN,Germa
WF_CRIT_INCL_CD,Gleich Null,IS_NULL,German,Common
WF_CRIT_INCL_CD,Ungleich Null,IS_NOT_NULL,German,Co
WF_CRIT_TYPE_CD,Prozesseig
WF_CRIT_TYPE_CD,Task-Eigen
WF_CRIT_TYPE_CD,Business Component,BUSCOMP,German,C
WF_CRIT_TYPE_CD,Applet,APP
WF_CRIT_TYPE_CD,Ausdruck,E
WF_DATA_TYPE_CD,String,VAR
WF_DATA_TYPE_CD,Nu
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi ,
The following are special characters:
@"?/>.<,:;""'{[}]|\\+=_-)( *&^%$#@!~` "; Thanks
The following are special characters:
@"?/>.<,:;""'{[}]|\\+=_-)(
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to Zmo and blu for your quick response..!!!!!!!!!
ASKER