SimpleSi Posted March 7, 2008 Posted March 7, 2008 For those of you like myself, who consider themselves multi-OS capable having worked on everything from a Cyber 1900 to a W2k3 server .... DON'T MAKE UP A LINUX SCRIPT USING A WINDOWS EDITOR AND EXPECT IT TO WORK WHEN RUN ON A LINUX BOX :( Why? Basically, your Linux scripts end up having a before each line and gives errors or even worse results :( Hope my experience helps someone else And sorry to Geoff once again regards Simon PS At ZH - still hitting image limit with my smileys!
Jona Posted March 7, 2008 Posted March 7, 2008 Out of interest what editor were you using? I'd say it's probably more related to that than a specific *nix - windows issue. Cheers Jona
SYNACK Posted March 7, 2008 Posted March 7, 2008 I had this problem at one point, notepad and other windows editors all seem to offend as they save the file with these little buggers on each line. The solution was to open the files in a linux editor and just scroll down with the cursor line by line at which point the editor removed the characters. Re-saving the file after this made them function.
SimpleSi Posted March 7, 2008 Author Posted March 7, 2008 @Jona 1. I can't remember. 2. Did you read the link? regards Simon
localzuk Posted March 7, 2008 Posted March 7, 2008 It depends on the editor really - better editors allow you to save in 'unix text' format, otherwise known as the proper way of doing it. Notepad is terrible for that problem.
Jona Posted March 7, 2008 Posted March 7, 2008 yeh notepad is a bit evil for this kind of thing, I use pspad and it seems to work a lot better - http://www.pspad.com/
tom_newton Posted March 7, 2008 Posted March 7, 2008 There's a few tricks to this: 1. Use a real editor http://www.vim.org/ - in vim: escape :set ff=unix :wq 2. use a commandline util to fix it - on ubuntu: apt-get install sysutils dos2unix HTH
box_l Posted March 11, 2008 Posted March 11, 2008 notepad ++ http://notepad-plus.sourceforge.net/uk/site.htm superb little app! syntax highlighting for so many things. regards BoX 1
SimpleSi Posted March 30, 2008 Author Posted March 30, 2008 Ta for replies - I'm trying out Notepad++ as its in the PortableApps suite so I can just stick it on the USB stick I use for my eeePC scripts and run it from there when I need to edit from Windows. regards Simon
Joedetic Posted March 30, 2008 Posted March 30, 2008 I use notepad++ as my text editor in windows It's excellent. I just use nano in *nix/*BSD
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now