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
]
Article Feedback -
Stripping ^M from your files
New Topic
|
Go to Top
|
Go to Topic
|
Search
|
Log In
Previous Message
|
Next Message
shell script for multiple files
Author:
jason kawaja
Date: 26-09-02 21:34
#!/usr/local/bin/bash
echo "Removing ^M's for the following files..."
for file in $*; do
echo "----> $file"
tr -d "\015" < $file > $file.$$
mv $file.$$ $file
done
echo "Done."
exit 0
Reply To This Message
|
Forum List
|
Flat View
Newer Topic
|
Older Topic
Topics
Author
Date
shell script for multiple files
new
jason kawaja
26-09-02 21:34
Re: shell script for multiple files
new
maximus
14-01-05 21:35
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