skip to main
|
skip to sidebar
Tuesday, 18 November 2008
How to read a text file into a command
so you have a text file (users.txt) and you want to read that into a script that prints out the users status using the getent command
while read line
do
getent passwd | $line
done < users.txt
and thats it!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
My Sys Admin
A collection of Solaris one-liners, nuggets, tips, tricks & troubleshooting.
Blog Archive
►
2010
(1)
►
March
(1)
►
2009
(85)
►
September
(5)
►
August
(2)
►
July
(5)
►
June
(14)
►
May
(25)
►
April
(8)
►
March
(8)
►
February
(18)
▼
2008
(8)
▼
November
(2)
Print a process tree in UNIX
How to read a text file into a command
►
March
(2)
►
February
(4)
No comments:
Post a Comment