can somebody recommend a good Linux text editor for Windows (if it exists), I wrote scripts for C-Shell using txt editor of windows but I have problem, it doesn't run because windows is not UNIX, what can I do? I don't want to install linux for a few scripts, I do testing of my scripts via unix server (this server is not mine), thanks in advance, also I treed dos2unix command
, also doesn't work
5 Answers
'vim' has a windows port over there. and you can save files with unix-lineending (among a lot of other things).
You could try and install Cygwin, this will give you a relatively complete Linux environment within Windows. You can configure it to install just what you need (like a shell and a few utilities, and vi or emacs), and go from there.
What does the file look look when you look at it in a plaint text editor such as notepad?
If it looks sensible as a text file in Windows, then you could try using the Windows (command line) version of dos2unix, although I would be surprised if the dos2unix program had a problem.
Look at it again to see that only the line breaks have changed.
What happens when you look at the file on the server? Does it look sensible?
Are you sure that the script works? (Have you remembered to make the script executable?)
dos2unix
? Error message? What happens when you run a script that's been processed bydos2unix
? If you're trying to run your script in Windowscmd.exe
, then you're right "Windows is not Unix". You will need to install Cygwin as Henno suggests or install Linux, or get access to a Linux or Unix system. And if you can, use any other shell besides csh or tcsh.