<div dir="ltr"><div>Greg,</div><div><br></div>I don't see how that will work as the command is interactive. You might want to use 'wr mem' or depending upon what you trying to do you can use an EEM that gets triggered on a logout and does a wr mem.<div>
<br></div><div>Ping me at work! Unity! :)</div><div><br></div><div>Gaurav</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 4:08 PM, Gregory Bruccoleri <span dir="ltr"><<a href="mailto:bruccoo@gmail.com" target="_blank">bruccoo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi Daniel,</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks for the link but I'm looking for something to run exclusively within rancid and bash.  The script I have works except sending the carriage return when writing the config to startup.  I figure an option on the last line would do it but no dice.</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div><div><font face="arial, sans-serif">#!/bin/bash</font></div><div><font face="arial, sans-serif">for line in $(cat routers.txt)</font></div><div><font face="arial, sans-serif">do</font></div>

<div><font face="arial, sans-serif">su -s /bin/bash -l rancid -c "/home/rancid/bin/clogin -c 'copy run start' $line"</font></div><div><font face="arial, sans-serif">done</font></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div></div><div style="font-family:arial,sans-serif;font-size:13px">I'm getting closer it seems as when this is ran it will display the command but after entering the command it times out:</div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div><div><font face="arial, sans-serif">router#copy run start</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Error: TIMEOUT reached</font></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 2:27 PM, Daniel Schmidt <span dir="ltr"><<a href="mailto:daniel.schmidt@wyo.gov" target="_blank">daniel.schmidt@wyo.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Y reinvent wheel?<div><br></div><div><a href="http://sourceforge.net/projects/cosi-nms/files/ciscocmd/" target="_blank">http://sourceforge.net/projects/cosi-nms/files/ciscocmd/</a></div>

<div><br><div class="gmail_extra"><br>
<br><div class="gmail_quote"><div><div>On Fri, Jan 10, 2014 at 9:26 AM, Gregory Bruccoleri <span dir="ltr"><<a href="mailto:bruccoo@gmail.com" target="_blank">bruccoo@gmail.com</a>></span> wrote:<br></div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
<div dir="ltr">Hello all, I have the following script but want to ensure that when changes are completed that the configuration changes are written to the startup config.<div><br></div><div>Here is my script:</div><div><br>



</div><div><div>#!/bin/bash</div><div>for line in $(cat routers.txt)</div><div>do</div><div>su -s /bin/bash -l rancid -c "/home/rancid/bin/clogin -x commands.cmds $line"</div><div>done</div></div><div><br></div>



<div>I've tried using the flat text command within "commands.cmds" to no avail and the -S option without success.</div><div><br></div><div>Does anyone have any input on how to make this work?</div><div><br>


</div>
<div>Thanks in advance,</div><div>G</div></div>
<br></div></div>_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a><br></blockquote></div><br></div></div></div>

<pre>E-Mail to and from me, in connection with the transaction 
of public business, is subject to the Wyoming Public Records 
Act and may be disclosed to third parties.

</pre></blockquote></div><br></div>
<br>_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a><br></blockquote></div><br></div>