|
|
Should be
I agree. This hint definitely is not a mac hint and has no place here. But since it is, it should at least be correct. The backslashes are missing and it is a poor solution anyway. It replaces all with spaces, but likely this is not what you want if your file has abbreviations (i.e. I.B.M.) or filenames.I disagree that it's not related to Mac OS X. The underpinnings of OS X definitely are Unix (to whatever degree the purists would argue) and these tools are always there. Besides, the more I learned about Regular Expressions, the better my life became :) I added a quote to your script so that the offered sample text would at least resolve properly.
It worked to replace all three messed-up punctuation marks in the sample. My new sig: "There is more Unix-nature in one line of shell script than there is in ten thousand lines of C" --Rootless Root ---
Should be
perl -pe 's/([a-z].)([A-Z"])/$1 $2/g'I tried this on the supplied text. It puts a space between the exclamation mark and the double quote. Correct is: perl -pe 's/([a-z.])([A-Z"])/$1 $2/g' |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|