how to loop through each line of file?
Posted on 2006-06-15
I’m trying to get a list of each logged on users and deal with each user separately. So what I’m thinking is save a list of all logged on users to a text file and extract each login name from each line in a loop.
So I’d do
Who > userList
TotalLoggedUsers=’who | wc –l’
Ok I know the total number of lines and I’ve got a list in a file
How do I loop through each line and extract the login name?