how to remove junk character

Reply

Join Date: Nov 2009
Posts: 15
Reputation: whizkidash is an unknown quantity at this point 
Solved Threads: 0
whizkidash's Avatar
whizkidash whizkidash is offline Offline
Newbie Poster

how to remove junk character

 
0
  #1
22 Days Ago
Hi Team,

I am new to shell script.
Do kindly help me remove junk character from a file having a million records.. As it is production setup do kindly advice

Thanks ...
Whizkidash
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,355
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven
 
0
  #2
22 Days Ago
Do kindly explain exactly what you need. Junk character means nothing.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 15
Reputation: whizkidash is an unknown quantity at this point 
Solved Threads: 0
whizkidash's Avatar
whizkidash whizkidash is offline Offline
Newbie Poster
 
0
  #3
22 Days Ago
hi

Junk character like ^M,#,$
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,355
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven
 
0
  #4
22 Days Ago
That "^M" is a unix line end, use the dos2unix command first. For the rest use sed.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC