LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-29-2020, 03:25 AM   #1
Janez72
LQ Newbie
 
Registered: Jan 2020
Posts: 2

Rep: Reputation: Disabled
In terminal, instead of executing command, linux inserts ">" in newline after it


I have a command that I wanna run in terminal, but everytime I paste and 'execute' it, instead of doing anything, the terminal goes in the following line, and puts the ">" symbol at the beginning. I think it treats everything like text or something, because I can keep pressing enter, and it will keep going in new lines putting the above mentioned symbol at the beginning.

The code I want to paste is:
Code:
 sudo -s -- << EOF
wget -O - https://content.runescape.com/downloads/ubuntu/runescape.gpg.key | apt-key add -
mkdir -p /etc/apt/sources.list.d
echo "deb https://content.runescape.com/downloads/ubuntu trusty non-free" > /etc/apt/sources.list.d/runescape.list
apt-get update
apt-get install -y runescape-launcher
EOF
The Result I get when I hold 'enter' is:
Code:
sudo -s -- << EOF
> wget -O - https://content.runescape.com/downloads/ubuntu/runescape.gpg.key | apt-key add -
> mkdir -p /etc/apt/sources.list.d
> echo "deb https://content.runescape.com/downloads/ubuntu trusty non-free" > /etc/apt/sources.list.d/runescape.list
> apt-get update
> apt-get install -y runescape-launcher
> EOF 
> 
> 
> 
> 
>
Any help MUCH apperciated!
 
Old 01-29-2020, 04:03 AM   #2
linom
Member
 
Registered: May 2015
Location: India
Distribution: Debian, CentOS,Redhat, Fedora, Ubuntu
Posts: 91

Rep: Reputation: 13
Quote:
Originally Posted by Janez72 View Post
I have a command that I wanna run in terminal, but everytime I paste and 'execute' it, instead of doing anything, the terminal goes in the following line, and puts the ">" symbol at the beginning. I think it treats everything like text or something, because I can keep pressing enter, and it will keep going in new lines putting the above mentioned symbol at the beginning.

The code I want to paste is:
Code:
 sudo -s -- << EOF
wget -O - https://content.runescape.com/downloads/ubuntu/runescape.gpg.key | apt-key add -
mkdir -p /etc/apt/sources.list.d
echo "deb https://content.runescape.com/downloads/ubuntu trusty non-free" > /etc/apt/sources.list.d/runescape.list
apt-get update
apt-get install -y runescape-launcher
EOF
The Result I get when I hold 'enter' is:
Code:
sudo -s -- << EOF
> wget -O - https://content.runescape.com/downloads/ubuntu/runescape.gpg.key | apt-key add -
> mkdir -p /etc/apt/sources.list.d
> echo "deb https://content.runescape.com/downloads/ubuntu trusty non-free" > /etc/apt/sources.list.d/runescape.list
> apt-get update
> apt-get install -y runescape-launcher
> EOF 
> 
> 
> 
> 
>
Any help MUCH apperciated!
I think you are pressing the spacebar the EOF before pressing the ENTER button. In other words do not use SPACE after EOF (at the bottom) and only press the ENTER key.
 
Old 01-29-2020, 05:39 AM   #3
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627

Rep: Reputation: Disabled
If you put that into a script and save it then run the script in the terminal it should work. If you want the terminal to run all those commands you need to enter them one at a time or put && between each command and run it as one line.
 
1 members found this post helpful.
Old 01-30-2020, 02:57 AM   #4
Janez72
LQ Newbie
 
Registered: Jan 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you so much! That did it!
 
Old 01-30-2020, 06:27 AM   #5
linom
Member
 
Registered: May 2015
Location: India
Distribution: Debian, CentOS,Redhat, Fedora, Ubuntu
Posts: 91

Rep: Reputation: 13
Thumbs up

Quote:
Originally Posted by Janez72 View Post
Thank you so much! That did it!
If that works out, do mark the thread as "Solved". This will help others too.
 
Old 01-30-2020, 07:08 AM   #6
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627

Rep: Reputation: Disabled
Quote:
Originally Posted by Janez72 View Post
Thank you so much! That did it!
You're very welcome. I'm pleased I was able to help.
Oh, and by the way, welcome to LQ.
 
  


Reply



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
PS1 prompt inserts text "777;preexec" LinuxGeek46 Linux - Software 2 12-09-2019 06:24 AM
match newline, space, newline vincix Programming 13 03-09-2017 03:14 PM
[SOLVED] Perl-generated page inserts "48 48" throughout javascript bluegospel Programming 1 06-27-2011 06:06 PM
[SOLVED] How to replace newline pattern in file by other newline pattern in a shell script XXLRay Linux - Software 9 11-29-2010 07:57 AM
VI replacement: newline for newline not working! jhwilliams Linux - Software 3 08-16-2007 06:11 PM

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

All times are GMT -5. The time now is 09:34 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