vodkadrinker
Technical User
I use perl but still tend to switch to ksh as I know it better.
I would like to read a list into variables, I see I can do a hashed array but I only see examples of a key plus a value.
Is there a simple way to read a list in say like "who" output into variables that I can use?
user1 pts/0 28 Feb 12:52 (10.10.10.1)
user2 pts/1 03 Mar 00:02 (10.10.10.2)
user3 pts/2 10 Mar 22:45 (10.10.10.3)
user4 pts/3 16 Mar 06:56 (10.10.10.4)
user5 pts/4 24 Mar 23:52 (10.10.10.5)
Many thanks in advanced VD
I would like to read a list into variables, I see I can do a hashed array but I only see examples of a key plus a value.
Is there a simple way to read a list in say like "who" output into variables that I can use?
user1 pts/0 28 Feb 12:52 (10.10.10.1)
user2 pts/1 03 Mar 00:02 (10.10.10.2)
user3 pts/2 10 Mar 22:45 (10.10.10.3)
user4 pts/3 16 Mar 06:56 (10.10.10.4)
user5 pts/4 24 Mar 23:52 (10.10.10.5)
Many thanks in advanced VD