[gnuwin32 - Help] RE: SED won't replace my CR LF's with a space
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.windows.gnu.user |
|---|---|
| Message-ID | <[email protected]> |
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4103938 By: kcw I used "tr" to replace all CR LF's with a neutral character, (eg "@"). I could then pipe the result into sed and manipulate it further. example: tr -s [\r\n] "@" | sed "s/^[[:space:]@]\+//g" | sed "s/[[:space:]]*@[[:space:]]*/@/g" | sed "s/@@\+/@/g" | ../bin/sed "s/@$//g" | sed "s/@/\"\x20\"/g" ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=74807 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV