LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2006, 12:04 PM   #1
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Rep: Reputation: 15
script creation woes


ok you may of seen my posts about needing help with certain scripts
but there is a more major problem im having in terms of them

my linux box doesnt have a monitier
i vnc into it
now if i creat a script in notepad or word on my windows pc and transfer it to the linux box
chmod 755 it
it wont work invalid command etc
if i type the same script on the gedit
it works

what can i use to create the script on my windows pc?
 
Old 06-17-2006, 12:26 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
After you transfer it from Windows to Linux, you need to run:

cat file | dos2unix > newfile

Windows machines use CR/LF at the end of a line, where UNIX-like systems use LF.

Last edited by macemoneta; 06-17-2006 at 12:28 PM.
 
Old 06-17-2006, 08:58 PM   #3
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
thank you
take it theres no wndows apps to make scripts for linux easier?
 
Old 06-17-2006, 10:53 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by mrgreaper
thank you
take it theres no wndows apps to make scripts for linux easier?
Does not seem like something very much in demand...
 
Old 06-17-2006, 10:57 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I'm not sure why you'd need to use notepad if you can VNC
into the thing. Use vi(m), emacs, nano, pico, gedit, kate,
whatever tickles your fancy on the machine itself.

Most of the above (with exception of the two small fellows,
don't know about gedit) even have indentation and syntax
colourisation support built-in ...


Cheers,
Tink
 
Old 06-18-2006, 08:00 AM   #6
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
well theres a bit of a glitch with the vnc

http://www.linuxquestions.org/questi...d.php?t=442876

to say it brief
the pc that vnc`s in (the windows pc) once in the keyboard doesnt work only the mouse so i have to use the keyboard for the other pc so i need to circumvent that
 
Old 06-18-2006, 08:34 AM   #7
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Setup SSH, you can SSH in (via putty) and use the keyboard on the machine that works. This will put you in a shell that you can write (and test) the scripts to your hearts content
 
Old 06-18-2006, 08:38 AM   #8
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Using VNC without SSH is a terrible security risk. VNC is not at all secure, unless used over SSH.
 
Old 06-18-2006, 09:47 PM   #9
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ethics
Setup SSH, you can SSH in (via putty) and use the keyboard on the machine that works. This will put you in a shell that you can write (and test) the scripts to your hearts content
couldnt find putty?

on vnc being unsecure i have to enter a password to connect to the vnc so perhaps the ssh thing is configured but no one would want to harm me anyway so its not a major issue
 
Old 06-20-2006, 08:37 AM   #10
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
There is a program for windows called Notepad2 (http://www.flos-freeware.ch/notepad2.html)
It can convert CR/LF to LF or CR and vice versa
 
Old 06-20-2006, 08:41 AM   #11
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by binary_y2k2
There is a program for windows called Notepad2 (http://www.flos-freeware.ch/notepad2.html)
It can convert CR/LF to LF or CR and vice versa
cool thanx
 
  


Reply


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
The creation of the best RPG kornerr General 89 08-05-2010 11:56 AM
log creation script problems lin00b Linux - Software 0 10-11-2004 11:57 PM
Music creation? RustBucket Linux - Software 2 08-16-2004 10:55 AM
Redhat 9.0 CD creation swassink Linux - Newbie 2 07-15-2003 05:35 PM
Modem Script woes... DarkSTech Linux - Networking 1 02-28-2003 08:01 AM


All times are GMT -5. The time now is 12:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration