help editing files in linux!!

Stuart Sears stuart at sjsears.com
Wed Mar 29 12:43:55 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mike wrote:
> i'm ftping a linux config file over to windows and editing it in
> windows.  when i send it back to linux i see all these ^M characterse in
> the doc.  how do i edit it in a safe way or how do i prevent the
> garbling on the return back to linux?

there are many ways to achieve this...
you could try
sed -i.dos 's/\r$//' filename
(replace <cr><lf> with the standard <lf>) - the original should be
backed up as filename.dos, just for safety

regards

Stuart
- --
Stuart Sears RHCA RHCX
To err is human, to forgive is Not Company Policy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEKoELamPtx1brPQ4RAsgPAJ4pll1FjNl4jnq3PPxu2dMVCzrHVACdHx0v
YTkeLPdbqIKTpYmFJYDldWg=
=nwdB
-----END PGP SIGNATURE-----




More information about the Redhat-install-list mailing list