Hi, you can check to see if you are root, i.e.:
`whoami` == "root" if that returns true, you are good to go. (btw, those are backticks around whoami) HTH, David Charles On Tue, 23 Oct 2001, Mark Johnson wrote: > I'm trying to write a bash script to install some files but it must be run > as root. Is there a way that I can get my script to check to see if it has > root priviledges and if not exit out? > >
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com