Solved Use finger command to read a file of users

January 22, 2013 at 12:36:00
Specs: unix

I would like to use the finger command to loop through a text file that I have created line by line until the end of all users on a unix server and then output the results of the finger to another file.

See More: Use finger command to read a file of users

Report •


#1
January 22, 2013 at 15:50:23
✔ Best Answer

Assume that the userfile.txt has one user per line:

#!/bin/ksh

while read user
do
   finger $user >> output.txt
done < userfile.txt


Report •

#2
January 23, 2013 at 09:25:22

Damn I was so close! Thanks a bunch!

Report •

Related Solutions


Ask Question