Back to the main page

The script for checking if user is working (logged on) on console


#!/bin/sh	
#	
#check if user is logged on the console	
#	

if [ `who am i |awk '{print $2}'` = "console" ]	
 then	
echo echo "Okay, you are on the console so we can continue" echo else echo echo "Sorry, this script requires that you work from the console " echo fi exit 0
Back to the main page