Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-23-2010, 08:05 PM   #1
LQ Newbie
Registered: Mar 2010
Posts: 6

Rep: Reputation: 0
Unhappy write ssh terminal

Hi, Im writing a code in bash script, in my ubuntu command terminal. The program should send the message, "Hello John!!" 5 times to john's terminal(assuming he is logged on to the server). But I keep getting this error: Syntax error: end of file unexpected (expecting "done")

I have tried everything and searched everywhere to find a solution and nothing has work
Please Help Me!




x=1 # this sets up the flag so we can have it send a limited amount

while [ $x -le 5 ]
write jdouglas << EFO
>Hello John!!
x=$(( $x + 1 ))


Old 03-23-2010, 08:57 PM   #2
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, PCLinuxOS
Posts: 652

Rep: Reputation: 84
Because >EFO does not end the here document.
Put EFO on a line by itself. (Delete >)


done, loop, ssh, terminal, while, write

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
Can I SSH into a tty terminal? dragos240 Gentoo 1 12-07-2009 04:46 PM
Terminal and SSH problem juanvelez Linux - General 1 04-27-2006 08:08 PM
Viewing another terminal using ssh, etc... is it possible? Nalorin Linux - Software 4 05-10-2005 12:06 PM
what happens if I close ssh terminal ? juanb Linux - General 1 09-17-2004 05:15 PM
SSH Remote Terminal gauge73 Linux - General 2 01-29-2003 10:01 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration