LinuxQuestions.org
Visit Jeremy's Blog.
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 11-04-2016, 11:30 AM   #1
Ambalo
LQ Newbie
 
Registered: Mar 2016
Posts: 19

Rep: Reputation: Disabled
Bash script from Microsoft Word to Terminal


Hi

I write a Bachelor Thesis whit Microsoft Word - I know I'm stupid - and want to put my scripts into it. But if I copy the script back to my bash script, Terminal don't do anything. No error, nothing.
I tried so much... very frustrated... Can someone help me please?

Regards
 
Old 11-04-2016, 01:17 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Arch
Posts: 10,017

Rep: Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196
Not sure why you would need to 'copy the script back' as copying does not delete anything (or it shouldn't). My guess would be that whatever editor you are using to re-create the scripts
with is putting some weird characters in the file. Assuming a Windows type editor, I would suggest running dos2unix over the file before running. Or, you could simply use an editor that is capable
of inserting unix line endings, something like notepad++.

If above is not the issue, you may want to provide a great more detail as the above is currently a guess based on your information (or lack thereof)
 
Old 11-08-2016, 01:00 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,391

Rep: Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774
As grail intimated, Linux and DOS (cli in MSWin) have different line-ending sequences, and full on apps like Word do even stranger things (formatting codes etc).

Basically, "don't do that"

Keep the runnable versions of your scripts separate; you can 'copy' them into Word or whatever, but don't bother with the reverse.

dos2unix is good for DOS to Unix (sic), but I'm not sure it can handle Word 'text' ...
 
Old 11-08-2016, 02:22 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Control + V probably isn't going to paste in most terminals. Under some gnome terminal environments, Control + Shift + V will paste. Otherwise the middle mouse button will paste in an xterm. You could always type it out when all else fails. Or put it in a plain text file on a web server for easier access.
 
Old 11-08-2016, 11:58 AM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,950

Rep: Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513
A Bachelor Thesis (especially one that includes titles, mathematics, figures, indexes, bibliography etc) should have been done using LaTeX.
LaTeX is available on both Windows and Linux.

If you import Word into LaTeX you will lose all formatting. So you need to effectively redo all the formatting.
 
  


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
Bash Script to tell if a word is not! in a txt file?? Drigo Linux - Newbie 4 01-31-2013 04:01 PM
[SOLVED] Reverse word order from variable BASH script? vankirk88 Programming 4 10-23-2011 11:55 AM
bash shell script read file word by word part 2 justina Programming 7 01-25-2011 01:19 PM
[SOLVED] bash shell script read file word by word. justina Programming 15 01-22-2011 10:12 AM
search a file for a word - bash script paul_mat Linux - Software 12 04-16-2006 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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