Michael C Tiernan wrote:
I am working on a small project and I have the need to identify the root volume
on a running linux system from inside a script. For the moment I'm in the Red
Hat EL environment but I'm expecting it to develop into a wider application.
if you want to "problematically" identify the root volume, you might
start with a random number generator :-)
on the other hand, if you want to "programatically" (who didn't have
coffee this morning? :-) identify root, how about starting with:
mount | grep ' / '
or maybe:
mount | grep '[ \t]/[ \t]' ;in case your version of mount inserts tabs
rather than spaces as separators
then maybe pipe through sed to eliminate unwanted extraneous text
Miles Fidelman
--
In theory, there is no difference between theory and practice.
In practice, there is. .... Yogi Berra
_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/