Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Rob Wellesley on August 31, 2002, 03:09:46 PM
-
Hi
I am writing a script to setup cdwriters(ing) and can't remember how to get lines inserted in files from the commandline
anyone??
thanks
-
Try
pico /etc/modules.conf
But rather than editing config files directly you should in many cases use custom templates. See the article on e-smith.org
http://www.e-smith.org/docs/papers/templates.html
I'm still learning and don't yet know which files should have custom templates or not, but it will tell you in the top of the file ie not to edit this file directly
Also see
http://www.linux.org/docs/index.html
Hope this helps
Ray Mitchell
-
thanks for your response but I am looking for something I can use in a script that will -
#
the reason is that /etc/modules.conf, while templated, is "different". additions are put right in the file not in the template
/etc/e-smith/templates/path_to_template wil show you which conf files are templated
ta
-
echo text >>filename
Put your text in quotes if there are spaces. You might have to escape certain characters as well.
>> appends
> overwrites
-
chris meredith wrote:
>
> echo text >>filename
>
thanks Chris, just the ticket!!
But - where is the manpage for >> :-)
(yes - I 'm kidding)
rob
-
For others who might not know, the >,>>,&,|,&&,||, etc. are actually shell metacharacters, and the default Linux shell is bash. So, 'man bash' is the right place to look.
-
Les Mikesell wrote:
>
> For others who might not know, the >,>>,&,|,&&,||, etc. are
> actually shell metacharacters, and the default Linux shell is
> bash. So, 'man bash' is the right place to look.
Of course!! - Excellent!
Thanks Les