Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.5: Mount a partition or volume on demand' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Mount a partition or volume on demand
Authored by: tedw on Aug 12, '09 01:31:23PM
And you have to be careful matching names that have the same pre-whitespace prefix. For example, with Boot, Boot i386, Boot ppc volume names the awk '/Boot/' command will match all three when the intention may be to match Boot.
I hadn't considered this, either, but since it's regular expressions it's not too difficult to resolve. if you have multiple volumes with similar names (like your boot, boot i3686, boot ppc) all you need to do is space-pad the regexp; i.e. use /boot / or /boot {3,}/ with a large enough number of spaces to exclude other names. diskutil will always output with space padding (so you don't need to worry about other whitespace), and the regexp won't match shorter names, so this should do the trick.

good point, thank you.

[ Reply to This | # ]

10.5: Mount a partition or volume on demand
Authored by: sjk on Aug 12, '09 02:18:30PM

That's my thinking on it, too. I'm just not code-savvy enough to quickly bang out a clean script. :)

[ Reply to This | # ]