Koozali.org: home of the SME Server

Using Nano to Edit scripts for Windows

Offline billi

  • *
  • 46
  • +0/-0
    • http://applitec.net
Using Nano to Edit scripts for Windows
« on: June 14, 2010, 01:20:13 PM »
Syntax      nano -D <script name>

Found this handy  in the world of netlogon scripts
You can write windows CMD / BAT scripts from the linux command line.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Using Nano to Edit scripts for Windows
« Reply #1 on: June 15, 2010, 05:32:36 PM »
Syntax      nano -D <script name>
Not to spoil the fun, but as far as I know above option will only make the text for the menu options and the top bar bold (bright white) with a black background instead of the black text on a gray background:
Code: [Select]
[root@smetest ~]# nano --help | grep "\-D"
 -D             --boldtext              Use bold instead of reverse video text
[root@smetest ~]#
It has nothing to do with writing CMD/BAT files. You can use nano without the -D option for that as well, or pico or vi for that matter. :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Using Nano to Edit scripts for Windows
« Reply #2 on: June 15, 2010, 10:41:58 PM »
It has nothing to do with writing CMD/BAT files. You can use nano without the -D option for that as well, or pico or vi for that matter. :-)

You can use any text editor, then use 'unix2dos'.

Offline billi

  • *
  • 46
  • +0/-0
    • http://applitec.net
Re: Using Nano to Edit scripts for Windows
« Reply #3 on: June 28, 2010, 05:48:09 AM »
This was my source for the comment
http://www.nano-editor.org/dist/v1.2/nano.html
Good to hear there are other options as well.