[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: homedir listing and adding domain..



* dani@cyber.ro (dani@cyber.ro) [Jan 03. 2002 06:56]:

> My problem: i have a homedir for around 800 users.I need to get all of
> them in a text file,each one on each line,with @domain.com after their
> username.. something like

> dscfde@domain.com
> 3424.324r2@domain.com
> 4fdr3r@domain.com
> ..

> how can i do that,with sed,or..

Are the users listed in /etc/passwd?

If you want to get interesting, for fun:

--8<-- all on one line -->8--

perl -F":" -ane 'print "$F[0]\@domain.com\n";' < /etc/passwd > ./addresses.txt

-->8--

Then you may want to take out root, bin, etc, from addresses.txt

-- 
Brian Clark | Debian GNU/Linux: 3950 packages to keep you busy.
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
The "C" in Rap is silent.



Reply to: