-   Programming (
-   -   write ssh terminal (

i_have_a_question 03-23-2010 08:05 PM

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 ))



KenJackson 03-23-2010 08:57 PM

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

All times are GMT -5. The time now is 01:14 AM.