Shell Script for Check are U root

by Administrator 18. August 2009 09:35

Gunakan editor favorit anda, terus ketik sbb 

 

#!/bin/sh

if ["$UID" != "0" ]; then

   echo "Error: You must be root"

   exit 1

fi

 

jangan lupa di save, kalau mau jalankan tinggal ketik sh script_anda.sh 

hasilnya :

[acul@acul home]$ sh script_anda.sh
Error: You must be root

:)

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Each morning when I open my eyes I say to myself: I, not events, have the power to make me happy or unhappy today. I can choose which it shall be. Yesterday is dead, tomorrow hasn’t arrived yet. I have just one day, today, and I’m going to be happy in it

Month List

Page List