The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Question - Stripping ^M from your files
Author: aLan 
Date:   28-03-00 09:00

Wow - my wife is going to love this. She does it by hand with ee.

Anyone know how to put this into a script?

I would like to put:
perl -pi -e "s:^V^M::g" <filenames> (or equivalent)
into a little script that I could type the comand:

# stripCR <filenames>

The script would be named stripCR and placed in sbin or someplace where it could be found easy enough (default), and should run on any system with a novice user install.

We are new to FreeBSD (8 months) so we aren't sure if this can be done. (Hoping!!!)

Thanks,

aLan


Reply To This Message
 
 RE: Question - Stripping ^M from your files
Author: aLan 
Date:   28-03-00 09:06

I dont know why but it didn't print everything...

It should have said

I would like to put:
perl -pi -e "s:^V^M::g" filenames (or equivalent)
into a little script that I could type the comand:

# stripCR filenames

Maybe using the greater than < sign and
the sign > less than arround filenames caused them to not print!

aLan

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org