Sponsored Content
Special Forums UNIX Desktop Questions & Answers line 3: syntax error near unexpected token `(' Post 302241434 by camzio on Monday 29th of September 2008 10:10:32 AM
Old 09-29-2008
Resolved

Many thanks to all those who replied, it actually worked by using, as advised cc hello.c -o hello and then running ./hello the book says to type gcc -g -o hello hello.c. Once again thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Syntax error near unexpected token `('

Guys , This is an output of my script errored out for "Syntax error near unexpected token `(' " Can someone tell me whats wrong with my script. Below is my original script pasted. #!/bin/bash Script Creation Date 01/21/2010 Author baraghun ... (7 Replies)
Discussion started by: raghunsi
7 Replies

2. UNIX for Advanced & Expert Users

syntax error near unexpected token '{

Hi, I am running the following script through cygwin and getting below mentioned error. ******************************************* #!/bin/sh # constants WORK_DIR="deploy" INFOFILE="deploy.info" INTROFILE="Intro.sh" CMGMT_PKG="com.kintana.cmgmt.deploy" DEPLOY_PREFIX="mitg" ... (2 Replies)
Discussion started by: MandyR
2 Replies

3. UNIX for Dummies Questions & Answers

Syntax error near unexpected token

hi! just want to seek help on this error: syntax error near unexpected token 'do this is my script # !/bin/sh # for y in 27 25 do exemmlmx -c "ZEEI;" -n XRT$y >> blah done what can be wrong? thanks! (6 Replies)
Discussion started by: engr.jay
6 Replies

4. Shell Programming and Scripting

Syntax error near unexpected token `}' please help

I'm going mad not being able to get this to work. im assuming its only a simple mistake but its driving me bonkers trying to find it. Please if you can help me it would save me pulling my hair out!! Thanks #!/bin/bash -xv # #Config name="TEST Server" + name='TEST Server'... (6 Replies)
Discussion started by: Fisheh
6 Replies

5. Shell Programming and Scripting

Cannot execute/finish script because of last line syntax error: unexpected end of file/token `done'

first of all I thought the argument DONE is necessary for all scripts that have or begin with do statements which I have on my script, However, I still don't completely understand why I am receiving an error I tried adding another done argument statement but didn't do any good. I appreciate... (3 Replies)
Discussion started by: wolf@=NK
3 Replies

6. Shell Programming and Scripting

Syntax error near unexpected token '('

I tried to execute the code but I got this error ./Array.c: line 9: syntax error near unexpected token '(' ./Array.c: line 9: ' nvals = get_data(a,MAXARRAY);' and #include<stdio.h> #define MAXARRAY 1000 main() { int a, nvals; nvals =... (7 Replies)
Discussion started by: sgradywhite
7 Replies

7. Shell Programming and Scripting

Syntax error near unexpected token

Hi all, I have a simple script that doesn't work somehow. I can't seem to be spotting the cause of the malfunction. count=$((1)) for item in `cat test1.txt` printf %s `sed -n $((count))p test2.txt` > test3.txt count=$((count+1)) do something done I get ; ./why.sh: line 3:... (14 Replies)
Discussion started by: y33t
14 Replies

8. Shell Programming and Scripting

Syntax error near unexpected token `else'

Hello every one!! I don't know where I am going wrong but I am finding it difficult to clear this error of syntax error near unexpected token `else' I am writing a simple shell script to find a file in a directory and if found execute that else return an error to the log file ... (14 Replies)
Discussion started by: masubram
14 Replies

9. How to Post in the The UNIX and Linux Forums

Syntax error near unexpected token `('

I have 2 files like a.txt and b.txt and the content is as below cat a.txt 810750125 117780 /BSCSQAT4A/bscsqat4a/lib/jar/wclt_common.jar 1803152428 13300 /BSCSQAT4A/bscsqat4a/lib/jar/WFMSSupportTool.jar 2663502779 67049 /BSCSQAT4A/bscsqat4a/lib/jar/wma.jar 687942896 665272... (1 Reply)
Discussion started by: ranabhavish
1 Replies

10. Programming

Sh: -c: line 0: syntax error near unexpected token `(' how to resolve this

Below query is not working for me. Please help me on this DATA EXCLUDE STATEMENT: TABLE:\"LIKE \'%\_HISTORY\'\", TABLE:\"LIKE \'%\_HIST\'\", TABLE:\"in \(select tname from tab where REGEXP_LIKE(TNAME,\'\_H$\'\))\", TABLE:\"LIKE \'%\_LOG\'\", TABLE:\"LIKE \'DW\_%\'\", TABLE:\"LIKE... (1 Reply)
Discussion started by: princy
1 Replies
nice(1) 						      General Commands Manual							   nice(1)

Name
       nice, nohup - execute a command at a lower priority

Syntax
       nice [-number] command [arguments]

       nohup command [arguments]

Description
       The  command  executes command with low scheduling priority (Bourne Shell only).  If the number argument is present, the priority is incre-
       mented (higher numbers mean lower priorities) by that amount up to a limit of 20.  The default number is 10.

       The super-user may run commands with priority higher than normal by using a negative priority, for example, `--10'.

       The command executes command immune to hangup and terminate signals from the controlling terminal.  The priority is incremented by 5.   The
       command	should	be  invoked  from  the shell with an ampersand (&) in order to prevent it from responding to interrupts by or stealing the
       input from the next person who logs in on the same terminal.  The syntax of is also different.

Options
       -number		   Increments the priority by a specified number up to a limit of 20.  The default is 10.

Restrictions
       The and commands are particular to If you use then commands executed with an ampersand (&) are automatically immune to hangup signals while
       in the background.  There is a built-in command which provides immunity from terminate, but it does not redirect output to nohup.out.

       The  command  is built into with a slightly different syntax than described here.  The form ``nice +10'' nices to positive nice, and ``nice
       -10'' can be used by the superuser to give a process more of the processor.

Diagnostics
       The command returns the exit status of the subject command.

Files
       nohup.out standard output and standard error file under nohup

See Also
       csh(1), getpriority(2), renice(8)

																	   nice(1)
All times are GMT -4. The time now is 07:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy