Add to text file from command line via echo... possible to add to a particular line?[Scanned]

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

 



Hi guys,

I'm making a setup script for my Linux boxes that re-install Openldap and some other bits and bobs. I need to add some text to /etc/pam.d/gdm for example, and it needs to be on a particular line in this file, not at the bottom.

For example using the command:

echo 'session required pam_mkhomedir.so skel=/etc/skel umask=0077' >> /etc/pam.d/gdm

Will only add this to the bottom of the file, can I get around this, it needs to be on the same position on all machines, ie line 8.

Cheers,

-Chris


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux