Programming :: Write SSH Terminal - Syntax Error

Mar 23, 2010

I am 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").

#!/usr/bin/sh
clear
x=1 # this sets up the flag so we can have it send a limited amount
while [ $x -le 5 ]
do
write jdouglas << EFO
>Hello John!!
>EFO
x=$(( $x + 1 ))
done

View 1 Replies


ADVERTISEMENT

Programming :: Parse Error: Syntax Error, Unexpected '@' In Php Code

Jun 14, 2011

Parse error: syntax error, unexpected '@' in C:xampphtdocsminippromail.php on line 8 .......its not recognizing the '@' symbol. heres the code im working with

<?php $receiver = myfriend@ourmail.co.in; $subject = wish; $content = Hi! My dear friend how are you.; $sender = myself@ ourmail.co.in ; $headers = From: $sender; mail($receiver,$subject, $content,$headers); echo Mail has been sent successfully.; ?>

View 1 Replies View Related

Programming :: Syntax Error - Pascal ?

Apr 29, 2010

I have an error, which I have no idea why appears. All brackets seems ok.

error:

Code:

Code:

View 13 Replies View Related

Software :: Dpkg - Add / Remove Package Won't Work - Terminal Goes: Bash Syntax Error Near Unexpected Token `newline'

Mar 11, 2010

When I am adding removing packages to get more hard drive space, this is not the first time I left too many pages open and it crashes on me. My son would fix it by typing in the terminal sudo something, but I want to know how to do this. The only thing not working is the add/remove packages at the moment. Here is what it said, E:dpkg was interrupted you must manually run 'dpkg--configure -a' to correct the problem E: _cache-open()failed please report. Please, could someone tell me how to get the default back or whatever. When I type in the terminal, it refused my password until I tried several times, plus, it finally says in the terminal No such command. Bash. No such command. I am hoping this question is one you do recognize the answer for.

I tried using Yum to remove the package. Like this:

To remove or uninstall a package:

Code:

yum -y remove ,package name>

Terminal goes: Bash syntax error near unexpected token `newline'

View 3 Replies View Related

Programming :: Sed - Syntax Error Near Unexpected Token

Mar 9, 2011

#by executing bash file
#!/bin/sh
sed -i 's/if (IEexec || domExec) document.write('<iframe id="IdMyIframe" '+IframePropriedades+'></iframe>');//g' *.php

Output is:
line 4: syntax error near unexpected token `<'
line 4: 'sed -i 's/if (IEexec || domExec) document.write('<iframe id="IdMyIframe" '+IframePropriedades+'></iframe>');//g' *.php'

View 6 Replies View Related

Programming :: Syntax Error Near Unexpected Token

Jun 18, 2010

I'm fairly new to shell scripting and am having the hardest time figuring out why this simple script is giving me an error

The error is "syntax error near unexpected token `else'

I'm using TextEdit on OSX (sorry I'm limited to this). The only thing I can think of is that it's reading some return character and getting thrown off. I've tried saving the script using different encoding types but the same error pops up.

I also get an error at line 2 because it does not regonize as a command

View 5 Replies View Related

Programming :: Syntax Error Near Unexpected Token - Not Working ?

Jan 28, 2010

I got this script from website for inviting peoples to game and earning points easily ...but this seems not working and giving error..

View 4 Replies View Related

Programming :: YACC Syntax Error Unexpected Identifier

Feb 5, 2010

I was going through this Lex/YACC tutorial: [URL]... and I was working along with it. The Lex examples worked fine, but the YACC one quit white compiling

[Code]...

View 5 Replies View Related

Programming :: Bash Daemon Encounters Syntax Error After Midnight?

Feb 24, 2011

I have a daemon script which wakes up every 5 minutes and checks the health of started processes. It works fine during the day but throws a syntax error just after midnight.Here is the log:

(02/22-23:49) Check all started processes
(02/22-23:54) Check all started processes
(02/22-23:59) Check all started processes

[code]....

View 9 Replies View Related

Programming :: C-shell Scripting Syntax Error When Defining Two Variables A1 And A2

Apr 5, 2011

I am trying to modify a script for research purposes and am having difficulty here as I have little prior experience with C-shell scripting.

The script looks as follows (it includes tcl commands like runFEP that you can ignore)

#!/bin/bash

for ((old=1, new=2; old<=4; old++,new++))
a1=${old}%50
a2=${new}%50
do
cat > input${new}.conf <<EOF
${a1}
code....

My question: I keep getting a syntax error when defining my two variables a1 and a2. I essentially need these variables to be
a1 = value of variable old divided by 50
a2 = value of variable new divided by 50

View 1 Replies View Related

Programming :: ./script.sh: Line 2 - Syntax Error Near Unexpected Token `('

Mar 11, 2010

Okay, first off I'm no hotshot programmer (and actually lack much familiarity with shell scripting) so apologies in advance if this problem is so trivial as to be irritating.

What I'm trying to do is drop the following command from either a shell script or a perl program. However, while it executes fine and does what it's supposed to when entered from the command line, I can't get it to work as a system call.

Here's the line:

Code:

When I drop it from a shell script like this:

Code:

I get the following:

Code:

If I try escaping the ()s with or ', I get this:

Code:

I've tried a bunch of other stuff to get it working (deleting the ()s, spacing them differently, etc) and looked around online for a solution, but I can't find anything that works.

I tried a shell script directly only after anything I tried to drop it from perl with `` or system() failed with the same errors.

View 3 Replies View Related

Programming :: Unable To Fix Syntax Error In Finding Ip Address Of A Host Name?

Apr 27, 2010

Writing a program that finds the IP address of a host name. Sorry forgot to include the line numbers, but where the $$$ is where the syntax error is. The errors are syntax error before "{" token and syntax error before "if". I've looked throught the code for a couple hours and can't figure out what's causing it. The code is attached below.

#define WIN
#include <stdio.h>
#include <stdlib.h>

[code]....

View 8 Replies View Related

Programming :: Bash Script Giving Unexpected End Of File - Syntax Error

Apr 12, 2010

I have a bash script giving me the following error:

[Code]...

When I run it I am getting: ./svnup: line 61: syntax error: unexpected end of file Can't for the life of me figure out what is wrong. It's a script to export the latest revision from SVN to the web root folder and archive the previous version, basically.

View 4 Replies View Related

Programming :: FreePascal: Mysql_query Syntax Error While Sql String Have Length More Than 256 Chars

Sep 1, 2010

I have an error like this : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''bla..bla..' at line 1. while call my function below:

function InsertSQL(strSQL: AnsiString; CS: TCriticalSection; var ErrMsg: AnsiString): boolean;
var
td: TDBCfg;
SockMySQL: PMySQL;
SQL: PChar;
begin
CS.Acquire;
[Code]...

The function always got this error while length of my strSQL contains more than 256 chars.

View 1 Replies View Related

Programming :: Check If A Process Is Running - Syntax Error Near Unexpected Token `else'

Feb 10, 2011

I have an ubuntu 10.10 server and want to run a script on it to check if a process is running. If it is not running, it will start the process and also write into a log file.

When running the script i get the following error message:

syntax error near unexpected token `else'

Here is my script.

View 7 Replies View Related

Programming :: Write A Bash Script To Call From A Terminal?

May 24, 2010

I am trying to write a bash script to call from a terminal that will change the terminal title. I am using ubuntu 10.04. The script is meant to be used in the gnome-terminal.

Here is what I have:

Code: #! bin/bash
echo "New title: c"
read title
echo "33]0;$titl07c" -e

[Code]....

it doesn't work

I think the problem has to do with modifying PS1 inside the bash so i tried this:

Code: echo `export PS1="[e]1;u@h:wa]${debian_chroot:+($debian_chroot)}u@h:w$ "` and it still didn't work.

View 1 Replies View Related

Programming :: Run Small Shell Script - Bash - Syntax Error Near Unexpected Token `('

Jul 9, 2010

I was trying to run small shell script, but could not run. I got the error like in subject.

This is exact way i was trying to do.

View 6 Replies View Related

Programming :: Write A Bash Script Program In System Command Terminal?

Mar 22, 2010

I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):

#!/bin/sh

clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"

View 5 Replies View Related

Programming :: Error - "syntax Error Near Unexpected Token Done"

Jul 23, 2011

I am a newbie in unix shell script programming . After I have tried to execute this code , I found the problem said that "syntax error near unexpected token done" . I don't know that where is the mistake in my code . Could anyone help me out this problem ?, PS* : I executed it in Redhat Enterprise Linux 4 and this is my code :

#!/bin/ksh
# Purge Script
# Input:
# 1. path (absolute path)
# 2. filename (does not apply to empty folder name)
# 3. retention policy (in day)

[Code]...

View 6 Replies View Related

General :: SUSE 10 Syslog-ng Syntax - Bash: Syntax Error Near Unexpected Token "("

Apr 20, 2011

I am a Novell (now defunct) CNE tring to learn Linux and am having a lot of trouble finding out where the WB 6-6 is wrong in the syntax for adding local4... the the syslog-ng config file. In the instructions there are discrepancies between commas and simi-comma, they are both in the statements in no particular order. there is no pattern to them. Here is what the book shows:

filter f_local4debug { level(debug) and facility(local4); };

When I try to input this in the Gnome terminal window to try and find out where it goes wrong I get the following: -bash: syntax error near unexpected token "(" If I can get the correct syntax I belive I can use the info to get past the rest of this portion of the lesson. I am desperate to learn Linux as the only jobs out there for a Novell CNE are migrations to MS, which really sucks, since MS really really sucks.

View 1 Replies View Related

Programming :: Getting Syntax Error On 4th Line From Bottom "else:"

Aug 24, 2010

keep getting a syntax error on the 4th line from the bottom "else:" fix this error and make this program work. It is a game.

[code]...

View 8 Replies View Related

Programming :: C - When Write A Program That Gives The Segmentation Fault Error

Jun 9, 2010

I am using Ubuntu 9.04 linux 2.6.28-11-generic. When I write a program that gives the "Segmentation fault" error, or when I send this signal (SIGSEGV) to a program, the "Segmentation fault" is shown and no core dumped. When I look for "core" file in the current directory, I can't find it, too.

View 2 Replies View Related

Debian :: Can't Get Work Terminal Syntax Highlighting

May 6, 2010

I can't get work terminal syntax highlighting for other users then root.To get the same result I've created /home/user/.bashrc and added the above options.I've also tried to override LS_OPTIONS in system-wide: /etc/bash.bashrc.In all cases is the highlighting working only for root.

View 1 Replies View Related

Ubuntu :: Error: Syntax Error On Line 20 Of /etc/apache2/sites-enabled/portal

Feb 1, 2010

I am trying a release of Ubuntu has have run into a problem that does not make much sense. I am receiving the following error: Syntax error on line 20 of /etc/apache2/sites-enabled/portal: Invalid command 'ProxyHTMLEnable', perhaps misspelled or defined by a module not included in the server configuration
fail! I believe the modules required for this is apt-get install libapache2-mod-proxy-html and it shows under the available modules and it was enabled with a2enmod proxy-html.

The line from the config is ProxyHTMLEnable On. The release is the latest download with updates from, 32bit.

View 4 Replies View Related

Fedora :: ERROR 1064 (42000): You Have An Error In Your SQL Syntax; Check The Manual That Corresponds To Your MySQL

Jul 20, 2010

i ,musing mysql5 at fedora12 i have just installed it but i ,m using mysqladmin -p root password mypassword it says ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin -uroot password 123456' at line 1

View 10 Replies View Related

Ubuntu :: Create New Directory But Keep Getting Same Error - Bash: Syntax Error Near Unexpected Token `newline'

Jan 13, 2010

I'm trying to create a new directory using the mkdir command.

Code:

home@ubuntu:~$ mkdir <aicoursework>
bash: syntax error near unexpected token `newline'

that's the error that i keep getting, what am i doing wrong?

View 5 Replies View Related

Ubuntu :: ERROR --bash: Syntax Error Near Unexpected Token 2

Feb 4, 2010

The following problem occurs to me, I'm creating a distribution (as a class project) for my school (I'm studying telecommunications and computer systems). I am following, in order to create the distribution, the manual that you can find on this page: [URL] But when I get to write:

[Code]...

View 3 Replies View Related

General :: Bash Error - Syntax Error Near Unexpected Token `{

Mar 4, 2010

I am new to shell scripting, bash specifically.

I am trying to run the following script:

Code:

When trying to execute I always get this error:

Code:

In case you need to know the permissions. Here is it:

Code:

I run the script using the following command:

Code:

View 1 Replies View Related

General :: Error:syntax Error GRUB Or Similar

Feb 5, 2011

My brother has Tri boot Ubuntu ,7 and Vista ..GRUB2 is the bootloader..The problem : At boot after the Lenovo splash disappears , there appears some 4 to 5 lines of error , error:syntax error GRUB or similar..This is visible only for a fraction of a second before the GRUB2 menu pops up...

The OS es load properly on selection in the menu so no loss of functionality One another problem is there is no OS highlighted by default and the timeout message "Automatic Boot in 10 Secs" does not appear Reinstalling GRUB does not solve the issue

View 1 Replies View Related

Programming :: Can't Get The Syntax Right In This Pyqt3 Command?

Mar 14, 2010

Code:
x = self.spinbox37.value() * 40
y = self.spinbox38.value() * 40

[code]...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved