in reply to Last logon and time for a system console
system("finger$_ $_");
Let's say one of your hosts in hosts.txt is named "foo", then your command line would expand to
fingerfoo foo
Probably not what was intended...
Update: perhaps you meant something like "ssh host last -n1"1 ? (see "man last") With finger, you'd need to specify some user ("finger user@host"), so this probably isn't what you want — and depending on your site configuration, remote fingering (i.e. @host) may not work at all.
___
1 after seeing Utilitarian's reply, I realize that "the last login and time for every system" can be read in several ways. The way I understood it was that you wanted to know when anyone last logged in on those hosts, not from those hosts to your local machine...
|
|---|