[K12OSN] Scripting help...how to read lines from a text file

Roger roger.in.eugene at gmail.com
Tue Oct 4 15:30:09 UTC 2005


On 10/4/05, David Trask <dtrask at vcsvikings.org> wrote:
>  Hi,
>
> I'm trying to write a script to log off kindergarten kids.  TeacherTool
> and Fl_TeacherTool will work, but I'd like to make it easier.  Here's what
> I'm trying to do....
>
> I have a script that I call "stop"  (usage is:  stop username) which
> simply kills the user and all associated processes...very effective.  What
> I'm trying to do is write another script that will read the usernames from
> a list in a text file.
>
> I know how to get names from /home....
>
> for x in `ls /home`; do

try, for x in `cat filename`;do echo $x ;done



Roger




More information about the K12OSN mailing list