LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 09: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, 10:13 PM   #17
MadMaverick9
Member
 
Registered: Aug 2010
Posts: 353
Blog Entries: 4

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-06-2012 at 11:50 PM.
 
Old 03-07-2012, 02:36 AM   #18
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
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 02:40 AM.
 
Old 03-07-2012, 11:58 AM   #19
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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



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 03:11 AM
: bad interpreter: No such file or directory ciberrust Linux - Networking 10 09-09-2010 06:51 AM
/bin/bash: bad interpreter: Permission denied cap_ahab Linux - General 4 01-17-2006 08:11 AM
bash: ./fam_mirror: bad interpreter: No such file or directory linuxboy69 Linux - Software 5 12-22-2003 11:35 AM
bash: ./myscript: bad interpreter: No such file or directory Stefangeelen Linux - Newbie 3 09-05-2002 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:57 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
Open Source Consulting | Domain Registration