Ok pretty newbie here on the programming and scripting what is "perl" Please?
Steve Barnes Manager PCS-WIN RC-WiFi Wireless Internet Service -----Original Message----- From: mikrotik-boun...@mail.butchevans.com [mailto:mikrotik-boun...@mail.butchevans.com] On Behalf Of Josh Luthman Sent: Friday, July 17, 2009 10:13 AM To: Mikrotik discussions Subject: Re: [Mikrotik] Exporting and Importing system scripts Kristian - that perl code will same my life time and time again =) I tried it on 2.9.50 and 2.9.51 and 3.22 and 3.13 Simple export then import (just system scripts) and they all complained about the syntax. Kevin's code would complain it already exists, so the syntax is definitely understood. Just be sure to keep Kevin's copy and not depend on MT's export as it can't understand what it spit out... Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373 "When you have eliminated the impossible, that which remains, however improbable, must be the truth." --- Sir Arthur Conan Doyle On Thu, Jul 16, 2009 at 11:17 PM, Kristian Hoffmann <kh...@fire2wire.com>wrote: > I think I'm a bit late to the party, but here's the perl script that I > use to convert our MikroTik scripts from human-readable text files into > importable rsc files... > > http://users.fire2wire.com/~khoff/txt2rsc.txt<http://users.fire2wire.com/%7E khoff/txt2rsc.txt> > > Just rename it to txt2rsc.pl and call it like so... > > perl ./txt2rsc somescript.txt > > ...and it will create somescript.rsc containing the escaped code to > import the script with the name "somescript". In other words, you can > ftp the somescript.rsc file to the router, run "/import somescript.rsc", > and then you should be able to "/system script run somescript". > > In regards to Josh's original question, I believe what you're doing > should actually work (write the script on the router and export/import > it on others). It's probably a bug in 3.22 that's producing a > syntactically invalid export. It certainly wouldn't be the first time. > > Regards, > > -Kristian > > On Thu, 2009-07-16 at 11:15 -0600, Kevin Neal wrote: > > Between Josh and I we got it working. I'm going to post the code on a > > wiki, after it's posted I'll updated this thread. > > > > -Kevin > > > > > > On Thu, Jul 16, 2009 at 11:00 AM, Josh > > Luthman<j...@imaginenetworksllc.com> wrote: > > > On my 3.22 x86 home router > > > > > > [jluth...@uberpwnage] /interface wireless> exp > > > > > > I see no errors... > > > > > > Josh Luthman > > > Office: 937-552-2340 > > > Direct: 937-552-2343 > > > 1100 Wayne St > > > Suite 1337 > > > Troy, OH 45373 > > > > > > "When you have eliminated the impossible, that which remains, however > > > improbable, must be the truth." > > > --- Sir Arthur Conan Doyle > > > > > > > > > On Thu, Jul 16, 2009 at 12:20 PM, Randy Cosby <dco...@infowest.com> > wrote: > > > > > >> Josh, > > >> > > >> Just out of curiosity, if you do a /export and watch the output, is > there > > >> a part marked in red for "wds-ignore-ssid=.."? > > >> > > >> On mine, 3.23, I see that it thinks "wds-ignore-ssid=no" is an invalid > > >> argument... so why is it in the export? > > >> > > >> Randy > > >> > > >> > > >> Josh Luthman wrote: > > >> > > >>> More correctly it was > > >>> > > >>> /system script > export file=test > > >>> > > >>> I started at that level so it only got system script export > > >>> > > >>> Josh Luthman > > >>> Office: 937-552-2340 > > >>> Direct: 937-552-2343 > > >>> 1100 Wayne St > > >>> Suite 1337 > > >>> Troy, OH 45373 > > >>> > > >>> "When you have eliminated the impossible, that which remains, however > > >>> improbable, must be the truth." > > >>> --- Sir Arthur Conan Doyle > > >>> > > >>> > > >>> On Thu, Jul 16, 2009 at 11:45 AM, Casey Mills <wkm...@gmail.com> > wrote: > > >>> > > >>> > > >>> > > >>>> Yea I could see how that would happen. If you ran the commands: > > >>>> > > >>>> > > >>>> > > >>>>> export file=test > > >>>>> import test.rsc > > >>>>> > > >>>>> > > >>>> You would get all kinds of errors. You would be re-adding all the > same > > >>>> IPs > > >>>> to the same interfaces..... You would need to do it in this order. > > >>>> > > >>>> > > >>>> > > >>>>> export file=test > > >>>>> system reset-configuration > > >>>>> import test.rsc > > >>>>> > > >>>>> > > >>>> If you do these three steps on the same router and you still get an > error > > >>>> that is a problem. Why don't you attach your export along with the > line > > >>>> and > > >>>> column you are getting the error. Make sure you take out your > passwords > > >>>> and > > >>>> stuff. > > >>>> > > >>>> Casey > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> On Thu, Jul 16, 2009 at 10:54 AM, Josh Luthman > > >>>> <j...@imaginenetworksllc.com>wrote: > > >>>> > > >>>> > > >>>> > > >>>>> I can FTP the rsc no problem. The problem is that I can't execute > > >>>>> > > >>>>> > > >>>> commands > > >>>> > > >>>> > > >>>>> (use the CLI) to make the system scripts. > > >>>>> > > >>>>> A simple system script export file=test.rsc will render test.rsc > useless > > >>>>> (by > > >>>>> the same router that just exported it). > > >>>>> > > >>>>> Josh Luthman > > >>>>> Office: 937-552-2340 > > >>>>> Direct: 937-552-2343 > > >>>>> 1100 Wayne St > > >>>>> Suite 1337 > > >>>>> Troy, OH 45373 > > >>>>> > > >>>>> "When you have eliminated the impossible, that which remains, > however > > >>>>> improbable, must be the truth." > > >>>>> --- Sir Arthur Conan Doyle > > >>>>> > > >>>>> > > >>>>> On Thu, Jul 16, 2009 at 10:48 AM, Casey Mills <wkm...@gmail.com> > wrote: > > >>>>> > > >>>>> > > >>>>> > > >>>>>> You can FTP the files over or use drag and drop with Winbox. Are > there > > >>>>>> > > >>>>>> > > >>>>> any > > >>>>> > > >>>>> > > >>>>>> other ways to transport the files? > > >>>>>> > > >>>>>> Casey > > >>>>>> -------------- next part -------------- > > >>>>>> An HTML attachment was scrubbed... > > >>>>>> URL: < > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>> > > >>>> > http://www.butchevans.com/pipermail/mikrotik/attachments/20090716/2102513f/a ttachment.html > > >>>> > > >>>> > > >>>>> _______________________________________________ > > >>>>>> Mikrotik mailing list > > >>>>>> Mikrotik@mail.butchevans.com > > >>>>>> http://www.butchevans.com/mailman/listinfo/mikrotik > > >>>>>> > > >>>>>> Visit http://blog.butchevans.com/ for tutorials related to > Mikrotik > > >>>>>> RouterOS > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>> -------------- next part -------------- > > >>>>> An HTML attachment was scrubbed... > > >>>>> URL: < > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>>> > http://www.butchevans.com/pipermail/mikrotik/attachments/20090716/34a4bdea/a ttachment.html > > >>>> > > >>>> > > >>>>> _______________________________________________ > > >>>>> Mikrotik mailing list > > >>>>> Mikrotik@mail.butchevans.com > > >>>>> http://www.butchevans.com/mailman/listinfo/mikrotik > > >>>>> > > >>>>> Visit http://blog.butchevans.com/ for tutorials related to > Mikrotik > > >>>>> RouterOS > > >>>>> > > >>>>> > > >>>>> > > >>>> -------------- next part -------------- > > >>>> An HTML attachment was scrubbed... > > >>>> URL: < > > >>>> > > >>>> > http://www.butchevans.com/pipermail/mikrotik/attachments/20090716/f2f03363/a ttachment.html > > >>>> _______________________________________________ > > >>>> Mikrotik mailing list > > >>>> Mikrotik@mail.butchevans.com > > >>>> http://www.butchevans.com/mailman/listinfo/mikrotik > > >>>> > > >>>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > > >>>> RouterOS > > >>>> > > >>>> > > >>>> > > >>> -------------- next part -------------- > > >>> An HTML attachment was scrubbed... > > >>> URL: < > > >>> > http://www.butchevans.com/pipermail/mikrotik/attachments/20090716/e1c10261/a ttachment.html > > >>> > > > >>> _______________________________________________ > > >>> Mikrotik mailing list > > >>> Mikrotik@mail.butchevans.com > > >>> http://www.butchevans.com/mailman/listinfo/mikrotik > > >>> > > >>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > > >>> RouterOS > > >>> > > >>> > > >> > > >> -- > > >> Randy Cosby > > >> Vice President > > >> InfoWest, Inc > > >> > > >> work: 435-773-6071 > > >> email: rco...@infowest.com > > >> > > >> http://www.linkedin.com/in/randycosby > > >> > > >> > > >> _______________________________________________ > > >> Mikrotik mailing list > > >> Mikrotik@mail.butchevans.com > > >> http://www.butchevans.com/mailman/listinfo/mikrotik > > >> > > >> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > > >> RouterOS > > >> > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: < > http://www.butchevans.com/pipermail/mikrotik/attachments/20090716/e9507aef/a ttachment.html > > > > > _______________________________________________ > > > Mikrotik mailing list > > > Mikrotik@mail.butchevans.com > > > http://www.butchevans.com/mailman/listinfo/mikrotik > > > > > > Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > RouterOS > > > > > _______________________________________________ > > Mikrotik mailing list > > Mikrotik@mail.butchevans.com > > http://www.butchevans.com/mailman/listinfo/mikrotik > > > > Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > RouterOS > > > > _______________________________________________ > Mikrotik mailing list > Mikrotik@mail.butchevans.com > http://www.butchevans.com/mailman/listinfo/mikrotik > > Visit http://blog.butchevans.com/ for tutorials related to Mikrotik > RouterOS > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.butchevans.com/pipermail/mikrotik/attachments/20090717/1f4ee587/ attachment.html> _______________________________________________ Mikrotik mailing list Mikrotik@mail.butchevans.com http://www.butchevans.com/mailman/listinfo/mikrotik Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS _______________________________________________ Mikrotik mailing list Mikrotik@mail.butchevans.com http://www.butchevans.com/mailman/listinfo/mikrotik Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS