Wordpad or Notepad?

I am new to using UNIX and after uploading a new script to UNIX from Windows using FTP, the script doesn't always work. It seems this depends on the text editor I use and the transfer type. I understand all scripts should be transferred using ASCII, but can you advise which is the best text editor to use out of Notepad and Wordpad?

After doing some research it seems wordpad is most popular, however I had problems with this, and my script now works after opening and saving in notepad as a test document with qoutes encasing the filename.

Please offer any advice on this issue.

Provided you save the document in ASCII, using any text editor has no difference. For me I will prefer Notepad because it is a text editor, not a "word processor" that can save text files. But you can just use any other free/commercial text editors on Windows anyway. I will only use notepad when there is no alternative installed because it doesn't do syntax highlighting. For me, I install gvim on Windows. The choice is always yours.

Most likely you did not save the file as ASCII text, so it may become doc or rtf or something like that.

As a general rule, just make sure you are always saving the script as ASCII text, and always use FTP ASCII mode (if you use Binary mode, you have to use a Windows text editor that supports Unix EOL, and save the script with Unix EOL).

You should use Notepad as it is a plain text editor while Wordpad is a word processor.

Hi you could directly type the required script in unix editor right.
why should you type it in wordpad or notepad and FTP it to UNIX?

Being new to UNIX, using the editor VI has previously proved to be a bit of a challenge and has taken some time to come to terms with the different keys that should be used for navigating around VI.

However, since posting this topic I have been on a UNIX course and have a much better understanding now of permissions, FTP, VI and much more

:slight_smile:

Notepad is as ASCII as you can get, by my understanding. WordPad still allows for formatting. I would stick with NotePad.

Notepad for sure, incidentaly, i use pico which is extreml user friendly

Try using one of these free text editors. They have much more functionality.

Textpad
TextPad - the text editor for Windows

Programmers File Editor (PFE)
Programmer's File Editor Home Page

The newline characters are different between Unix and Windows. So if you write a script in Windows, it may not work in Unix.

dos2unix is one utility that you can use to clean up your windows text files for use in Unix.

i'd say use notepad ...

however ...

regardless of what text editor one uses in windows, one should always get proficient in vi at a minimum --- ed would be even better --- since that would be the only text editor one can get if one runs into server problems and needs to modify files to get things working again ...

:cool:

... there are two options, and they're both freeware.

  • Crimson Editor, which is so great for creating, editing and saving Unix files that I now have it set to edit practically every .dot file in my Cygwin install.

  • Alpine, a standalone version of Pine (Unix email client) and Pico (text editor) paired by their authors and onetime maintainers at the University of Washington. The Pico standalone app saves in UTF-8, so it might be worthwhile checking some of its saved output via cat or vi before uploading any of it. I'm partial to Pico and nano anyway, so I was very gratified to find there was a Win32 standalone of the former.

Here I would have to agree. Even the OS X Terminal, while providing nano (and maybe pico too, nowadays, who knows), installs with vim (vi modified) as the $EDITOR selection in its .bashrc. And most of the helps and how-to's for Mac command-line you find on the Web assume you use vim as your editor.

Hope this was helpful.

BZT

No panacea that dos2unix (or 'tleast maybe the one I use isn't robust enough).

I've had occasions happen where it left garbage characters (carat-qmark pairings particularly) in files I thought were, at minimum, ASCII and the line-endings just needed tweaking. I find the better approach to be to use a CLI editor or the GUI one I mentioned in my previous post, Crimson Editor.

BZT

Thanks for all the replies. I ended up learning to edit w/ VI.