[K12OSN] Re: Need script help for fl_teachertool

cliebow at midmaine.com cliebow at midmaine.com
Wed May 3 10:18:27 UTC 2006


robert:beautiful job on tt..trying it out today..chuck

> On 5/2/06, Robert Arkiletian <robark at gmail.com> wrote:
>> I can find the ip of a client I am sitting at with
>>
>> cat /etc/hosts | grep `echo $DISPLAY | cut -d: -f1` | cut -f1
>>
>> problem is if I run this command from the server I get
>>
>> Usage: grep [OPTION]... PATTERN [FILE]...
>> Try `grep --help' for more information.
>
> Found a solution.
>
> cat /etc/hosts | grep -w `echo $DISPLAY | sed -e 's/:/ /g' | awk
> '{print $1}'` | cut -f1
>
> which returns 127.0.0.1 and that works in my code.
>
> I'm wondering are the client hostnames of
>
> ws253.ltsp
> ws252.ltsp
> ws251.ltsp
> etc...
>
> always
>
> 192.168.0.253
> 192.168.0.252
> 192.168.0.251
> etc...
>
> if they always match like this then I don't need to look in /etc/hosts
> --
> Robert Arkiletian
> Fl_TeacherTool http://fltk.org/links.php?V269
> C++ GUI tutorial http://fltk.org/links.php?V19
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>





More information about the K12OSN mailing list