Community discussions

MikroTik App
 
jimstolz76
just joined
Topic Author
Posts: 24
Joined: Tue Nov 01, 2011 10:12 pm

Script formatting - extra lines?

Tue Jan 22, 2013 4:55 am

With Springs' help, I've been playing with this on a Macbook (mac Winbox wineskin & OSX terminal), Windows 7 VM on that macbook, RDP into my desk PC from that same macbook, and now from a machine running Linux Mint 14. I'm getting the exact same thing no matter what combination I use. I'm trying to wrap my head around why it's working this way...

If I go into Winbox and create a new script called 'test_me' that is this:
# I am a script
# and I am not double-spaced
Then if I go into terminal and do /system script edit test_me source, this is how it is displayed:
# I am a script

# and I am not double-spaced
There is a definite 'line' between them, and it can be deleted. If I delete that line between them, the script in winbox changes to:
# I am a script# and I am not double-spaced
So what is defining the 'end-of-line', and are there any issues with working from a Mac that can create formatting issues in scripts?
 
User avatar
jgellis
Member Candidate
Member Candidate
Posts: 139
Joined: Wed May 30, 2007 10:57 am
Location: USA

Re: Script formatting - extra lines?

Thu Feb 07, 2013 7:53 am

This is just the way they are rendered in the cmdlin editor. If you were to export the script to a file and view it on your PC/Mac or edit it in Winbox GUI, you would not see the extra line breaks.

This is not an issue with your choice of Wine or ssh/telnet client as the same behavior is exhibited from the Terminal *within* Winbox.

Who is online

Users browsing this forum: armandfumal, codi639, gotsprings, jaclaz, patrikg, philipwillemse and 126 guests