On Thu, 2005-07-14 at 15:36 -0400, Christophe PEREZ wrote: > Le Thu, 14 Jul 2005 14:57:53 -0400, Chris Gianelloni a écrit : > > > I just did it like this: > > > > sed -i 's/##STARTX/su - $first_user -c "source /etc/profile && > > startx"/' /root/.bashrc > > ??? > > - $first_user won't be used > - too much '/' > - & will be replaced > > In the way with "'", it should be : > sed -i 's|##STARTX|su - '"${first_user}"' -c "source /etc/profile \&\& > startx"|' /root/.bashrc > > no ? "s:##STARTX:su - $first_user -c 'source /etc/profile \&\& startx':" works... I just tested it... -- Chris Gianelloni Release Engineering - Strategic Lead/QA Manager Games - Developer Gentoo Linux