[K12OSN] How about a scripting question :-)
Jim Kronebusch
jim at winonacotter.org
Thu Nov 9 20:29:32 UTC 2006
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.
More information about the K12OSN
mailing list