On Wed, Feb 25, 2004 at 02:39:43PM -0800, Uma Lakshmanan ([EMAIL PROTECTED]) wrote: > Hi , > I am trying to write a script to see if a particular file system is > mounted. If not I need to mount the file system. Is there a specific > function that I could use for the file system. > Thanks in advance.
To really help we need to know which operating system you are working with. If Linux you could use http://search.cpan.org/~snck/Linux-Mounts-0.4/Mounts.pm and then call "mount" with Perl's "system" or "exec" functions. Looks like a possibility anyway. I've not implemented this myself. Someone else might have a better idea. Personally I would probably just write a quick shell script utilizing: grep, mount and /proc/self/mounts. Kent -- "Efficiency is intelligent laziness." -David Dunham -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>