LinuxQuestions.org
Review your favorite Linux distribution.
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 05-10-2011, 12:46 AM   #16
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 437

Original Poster
Rep: Reputation: 19

The editors wouldn't work because in linux we use POSIX REs, in windows I used Perl REs, and \r\n doesn't mean a Dos line-break any more.
Looked at test.sh in Emacs hex editor, and it agreed with od, and it also converted it to unix mode for me. Ran this new test.sh and you are quite right, catkin, for it ran just fine. I thank you kindly for your help. But I'm beginning to feel haunted by this windows crap, it sticks to me like the tar baby in Brer Rabbit.

Last edited by porphyry5; 05-10-2011 at 12:50 AM. Reason: identify the person I was thanking
 
Old 05-10-2011, 01:05 AM   #17
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 437

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by chrism01 View Post
To cvt from MS -> *nix I use dos2unix http://linux.die.net/man/1/dos2unix
In vi/vim try
Code:
:set list
to see ctrl chars
Thank you, I've avoided these unix editors so far, they're so different to what I've been used to. With simultaneously learning linux, bash, awk, grep and sed I figured I had enough on my plate, and anything more would just be greedy. But I also consider a hex editor an essential, so if vi/vim includes one too, and is less long-winded than emacs, I'll be using it. If not, then I'll be using emacs.
 
Old 05-10-2011, 01:30 AM   #18
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Emacs is famous for being large; someone once said it's so complete/complex OS env, that with a bit of work you could make a decent editor out of it
vi/vim is much more minimalist, and also the default editor on various *nix (Solaris, HP-UX, AIX, Linux, *BSD...) systems for many years ie just about guaranteed to be avail, even on a 'broken' system.
Takes a little getting used to (it's modal), but very swift once you're across it.
I only 'know' / use a small num of cmds, but I can do just about everything I want & can find the rest if needed.
vim = vi improved.
http://www.vim.org/ & comes with a built-in tutorial.

Re your orig issue, in my system DOS line endings normally show up in vi as '^M' even without using the set cmd.
 
1 members found this post helpful.
Old 05-10-2011, 02:22 PM   #19
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 437

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by chrism01 View Post
Emacs is famous for being large; someone once said it's so complete/complex OS env, that with a bit of work you could make a decent editor out of it
vi/vim is much more minimalist, and also the default editor on various *nix (Solaris, HP-UX, AIX, Linux, *BSD...) systems for many years ie just about guaranteed to be avail, even on a 'broken' system.
Takes a little getting used to (it's modal), but very swift once you're across it.
I only 'know' / use a small num of cmds, but I can do just about everything I want & can find the rest if needed.
vim = vi improved.
http://www.vim.org/ & comes with a built-in tutorial.

Re your orig issue, in my system DOS line endings normally show up in vi as '^M' even without using the set cmd.
Thank you, vim has the perfect approach to text editing, the least amount of effort needed to do the job. Yes indeed, I'm going to be greedy! And KDE does include a very nice char/hex/oct/bin/dec editor, okteta, they just don't promote it so you have to dig for it. But I'll keep kwrite too, it lends itself so easily to navigating text files the way a browser navigates web pages.
 
  


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
How can i run two bash scripts at same time? helptonewbie Programming 3 09-05-2006 07:25 PM
How to run Bash scripts like thread in Java? nguyenzoro Linux - General 1 11-11-2005 03:08 AM
Cannot run install sh scripts, and bash is FUBAR...what to do? asdfjkl Linux - Software 5 11-20-2004 10:09 PM
How to Run perl scripts using bash Boudewijn Linux - Software 2 11-26-2003 04:37 AM
bash scripts won't run aamehl Linux - General 10 09-06-2003 03:25 PM


All times are GMT -5. The time now is 06:20 AM.

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