From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,a35541ecb4698ed1,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: f72b0,a35541ecb4698ed1,start X-Google-Attributes: gidf72b0,public X-Google-Thread: 1020c6,a35541ecb4698ed1,start X-Google-Attributes: gid1020c6,public X-Google-Thread: fa528,a35541ecb4698ed1,start X-Google-Attributes: gidfa528,public From: race9047@my-deja.com Subject: NEWBIE: Refine the time clock Date: 2000/04/15 Message-ID: <8dad85$n32$1@nnrp1.deja.com>#1/1 X-Deja-AN: 611587726 X-Http-Proxy: 1.1 x26.deja.com:80 (Squid/1.1.22) for client 63.11.185.32 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Apr 15 18:43:19 2000 GMT X-MyDeja-Info: XMYDJUIDrace9047 Newsgroups: comp.unix.questions,comp.unix.admin,comp.unix.misc,comp.unix.tru64 X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; MSNIA) I need help getting this to work. #!/bin/sh last |grep dan |grep 'date' The question is to "write a script that will print out the number of hours and minutes that a user has been logged on to the system. The scripts first argument should be the user's login". I am to assume that this is less than twenty-four hours and does not cross a day boundary. I tried putting it through vi-editor as it appears and trying to use a do/done command sequence also. For all I know the above is the correct script, but I may not be typing it in the write place, and typing it in correctly. So I need help on that too. Thanks, Race Sent via Deja.com http://www.deja.com/ Before you buy.