On Thu, Jan 03, 2002 at 02:03:37PM +0200, [EMAIL PROTECTED] wrote: > 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 > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > .. > > how can i do that,with sed,or.. I suggest awk:
You can get a list with ls and then use awk. awk '{print $1 "@domain.com"}' < your-file-here Or something like this: blah=$(ls /home/blah) for x in $blah do echo "[EMAIL PROTECTED]" >> outfile.txt done Sven -- >Lamer! :)\n Lokaler Admin mit enormen Rechten[tm] [Christian Schneider und Jens Himmelrath in alt.hacker.org-gcf] http://www.linux-secure.de http://www.linuxboard.de http://www.bluephod.net http://www.disconow.de