<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=224230314-03042008>dos2unix didn't remove them</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=224230314-03042008>cat xx > xxx didn't remove
them</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=224230314-03042008>strings does remove them</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=224230314-03042008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=224230314-03042008>Thanks Gerry. I knew there had to be an easier
way.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV></DIV>Does the flavor of linux you have offer dos2unix and unix2dos
commands?<BR><BR>
<DIV class=gmail_quote>On Thu, Apr 3, 2008 at 8:17 AM, Wakefield, Thad M. <<A
href="mailto:twakefield@stcloudstate.edu">twakefield@stcloudstate.edu</A>>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">The
file written by script during a router session
contains<BR>backspaces.<BR><BR>For example:<BR><BR>$cat -A xx<BR>AC6509#sho
proc cpu | e 0.0.^H ^H0^M$<BR>AC6509#sho te h^H ^H^H ^Hch^M$<BR><BR>In order
to share the file with Windows users, the backspaces<BR>need to be removed.
The file should be a WYSIWYG of cat:<BR><BR>$cat xx<BR>AC6509#sho proc cpu | e
0.00<BR>AC6509#sho tech<BR><BR>Web searches and experimenting with various
command options<BR>and pipes didn't solve the problem.<BR><BR>I wrote the
following to remove the backspaces:<BR><BR>#!/bin/bash<BR>while
:<BR>do<BR> if ( egrep -m1 ^H xx > /dev/null )<BR> then<BR>
sed -i 's/.^H//' xx<BR> else<BR>
exit<BR> fi<BR>done<BR> sed -i 's/^M//' xx<BR><BR>Is there an easier
solution using Linux
commands?<BR><BR><BR>Thad<BR><BR>_______________________________________________<BR>TCLUG
Mailing List - Minneapolis/St. Paul, Minnesota<BR><A
href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</A><BR><A
href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list"
target=_blank>http://mailman.mn-linux.org/mailman/listinfo/tclug-list</A><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>