LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Closed Thread
 
Search this Thread
Old 03-06-2012, 10:34 PM   #16
power_wong
LQ Newbie
 
Registered: May 2006
Posts: 3

Rep: Reputation: 0
Create shell script in Windows for Linux/Unix


The problem is due to the different end of line in Windows and Linux/Unix platform. Windows is using CRLF while Linux is using LF only.
I have 2 favourite text editor that can solve this problem.
1. Context --- It has a function "Convert Text to Unix (LF Only)" under its Tools menu

2. NotePad++ --- It has an "EOL Conversion --> Unix format" under its Edit menu

I have tested them, both are working fine.
HTH
 
Old 03-06-2012, 11:13 PM   #17
MadMaverick9
Member
 
Registered: Aug 2010
Location: Here
Distribution: Slackware 14.0
Posts: 147

Rep: Reputation: Disabled


http://vimdoc.sourceforge.net/htmldoc/usr_23.html#23.1

two things you need to do in Vim (not Elvis) to convert a file to unix format:

Code:
set fileformat=unix
%s/<Ctrl-V><Ctrl-M>$//

Last edited by MadMaverick9; 03-07-2012 at 12:50 AM.
 
Old 03-07-2012, 03:36 AM   #18
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Originally Posted by stevesk View Post
Ok guys, I confess, I used notepad.exe to make the scripts...
You should try wordpad in Windows as it is much more powerful and can actually write UNIX text files.

EDIT
Quote:
Originally Posted by brianL View Post
edit: ah damn. responding to a resurrected thread again. I really must check the dates more thoroughly.
Oops! me too, GazL.
FFS x2

Last edited by wildwizard; 03-07-2012 at 03:40 AM.
 
Old 03-07-2012, 12:58 PM   #19
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,810
Blog Entries: 54

Rep: Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986Reputation: 2986
Quote:
Originally Posted by brianL View Post
edit: ah damn. responding to a resurrected thread again. I really must check the dates more thoroughly.
Oops! me too, GazL.
And that was from 2008. Guess I'll need to help you lot. Closed.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bad interpreter: No such file or directory EcLip$e Linux - General 34 10-07-2013 04:11 AM
: bad interpreter: No such file or directory ciberrust Linux - Networking 10 09-09-2010 07:51 AM
/bin/bash: bad interpreter: Permission denied cap_ahab Linux - General 4 01-17-2006 09:11 AM
bash: ./fam_mirror: bad interpreter: No such file or directory linuxboy69 Linux - Software 5 12-22-2003 12:35 PM
bash: ./myscript: bad interpreter: No such file or directory Stefangeelen Linux - Newbie 3 09-05-2002 02:50 AM


All times are GMT -5. The time now is 02:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration