[K12OSN] How about a scripting question :-)

Mike Oliveri moliveri at rb60.com
Thu Nov 9 20:33:39 UTC 2006


I forgot ' around the substitution string. Just did some testing.

But now the other problem is it actually puts /n instead of a linebreak
in there.  Digging...

Mike

-----Original Message-----
From: k12osn-bounces at redhat.com [mailto:k12osn-bounces at redhat.com] On
Behalf Of Jim Kronebusch
Sent: Thursday, November 09, 2006 2:30 PM
To: Support list for open source software in schools.
Subject: RE: [K12OSN] How about a scripting question :-)

On Thu, 9 Nov 2006 14:23:26 -0600, Mike Oliveri wrote
> This might be too easy, but give this a shot. Copy /etc/group to a new

> file and delete all the other lines until you have your 
> comma-delimited group of users.
> 
> Then use sed to turn all of the commas into newlines (/n).
> 
> sed s/\,/\/n/g newfile >> /etc/mailusers
> 
> I've escaped the comma just in case. The forward slash for the newline

> does have to be escaped, though.
> 
> That's off the top of my head. I'm fuzzy on such things. Might want to

> experiment with a different output file first! :)

I get the following error, working on figuring out what it means.
[root at file ~]# sed s/\,/\/n/g group >> /root/mailusers
sed: -e expression #1, char 6: unknown option to `s'

Thanks

--
This message has been scanned for viruses and dangerous content by the
Cotter Technology Department, and is believed to be clean.

_______________________________________________
K12OSN mailing list
K12OSN at redhat.com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>




More information about the K12OSN mailing list