|
|
What about filenames with spaces?
This trick sounds good, but it doesn't work with files with spaces in the names. On Unix, I'm used to manipulating files with names like "really_long_filename.txt" but on the Mac they tend to be things like "really long filename.txt" and they don't parse the same way, you need extra help in deglobbing. I haven't quite figured this out, any hints or tricks you could suggest? I just had to manually rename 40 files because of this problem.
What about filenames with spaces?
Try adding sed 's/ / /g' after the ls and before the awk:
What about filenames with spaces?
The perl script "rename" above handles them fine.
Hypertalk versus unix..
AAARGGH! (Now I understand how my mother feels about the Finder - how I feel about perl and unix..) I try that and it complains about an invalid command code ? (sed: 1: "’s/Voyager/VOY/2’": invalid command code ?). The perl script complains that it can't understand $expr.. I'll just fire up Revolution a bit later and write it in damn (nouveau) HyperTalk.. At least it has a command " replace "foo" with "bar" in tStr ".. Now I'll have to see if it has a command 'rename file <>' Oh, I'll just use the " shell() " function - which I found after about a second with google.. Apple really dropped the ball when they killed Hypercard - and then the apocryphal QuickTime 3.. |
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.07 seconds |
|