> mount -p | sed -nr '2s/([^ ].*) +\S+ +\S+/\1/p' For readability, what about something like:
$ mount -m | sed -ne 's/.*cygdrive[^"]*"\([^"]*\)"$/\1/p' This is tolerant of spaces, and works even if other mountpoints include the phrase cygdrive, since mount -m outputs --change-cygdrive-prefix outside of quotes but directories in quotes, and relies on the fact that the mountpoint won't have an embedded " (thanks to Windows)... -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/