I use notepad++ on windows to edit shell scripts, then upload them onto a server and run them. I've just been struggling with a particular script (not enclosed) that was causing errors and have only just realised that even though my Settings->Preferences on notepad++ for new textfiles are format UNIX encoding UTF-8 without BOM (which I think is the UNIX standard), it appears that I have been editing a windows textfile all along.
Once I realised that this was the case, I did dos2unix on the server and the script worked, no problem.
My question is: how do I tell on notepad++ whether what I am saving is a windows textfile or a unix textfile? Presumably that tab in Settings->Preferences refers to newly-created files only, but this script was sent to me by a colleague (who also couldn't make the script work - now I know why!). If there had been something telling me that it was a windows textfile, I would have spotted the error immediately, but as it is it has taken me a day to work it out.
Any comments would be much appreciated,
Toby
PS. I use Windows XP and the latest version of NotePad++. On unix, I use bash.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear NotePad++,
I use notepad++ on windows to edit shell scripts, then upload them onto a server and run them. I've just been struggling with a particular script (not enclosed) that was causing errors and have only just realised that even though my Settings->Preferences on notepad++ for new textfiles are format UNIX encoding UTF-8 without BOM (which I think is the UNIX standard), it appears that I have been editing a windows textfile all along.
Once I realised that this was the case, I did dos2unix on the server and the script worked, no problem.
My question is: how do I tell on notepad++ whether what I am saving is a windows textfile or a unix textfile? Presumably that tab in Settings->Preferences refers to newly-created files only, but this script was sent to me by a colleague (who also couldn't make the script work - now I know why!). If there had been something telling me that it was a windows textfile, I would have spotted the error immediately, but as it is it has taken me a day to work it out.
Any comments would be much appreciated,
Toby
PS. I use Windows XP and the latest version of NotePad++. On unix, I use bash.