george@wciu.wciu.edu (George Peavy) (03/20/91)
I'm still learning shell programming, and have hit a snag that, so far, I haven't been able to figure out. Here's what's happening: I'm writing a menu program that, among other things, allows a user to select the option of up/downloading files to/from a PC. Since I also have terminals attached, I want to disallow this option unless the user is working from a port known to have a pc attached to it. What I have so far: I'm using Bourne shell on AT&T Sys V 3.0 running on a Unisys 6000/51 platform. I can get the port id with, who am i | awk '{ print $2 }' The question is, how do I get this information into a place where I can test the value? Is there a simpler way than my use of awk? posted(and I hope I've gotten the right group for followup) and email replies both welcomed. Thanks in advance. -- George Peavy (george@wciu.edu)