Sponsored Content
Full Discussion: Unexpected end of file error
Top Forums Shell Programming and Scripting Unexpected end of file error Post 302483908 by sen180185 on Wednesday 29th of December 2010 02:15:27 AM
Old 12-29-2010
I tried the code change but still getting the same error .
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

End of file unexpected error

Hi, I am new to unix. I have written a script whenever i am giving sh filename.sh its prompting unexpected end of file in line number 40 in that line i have echo statement what do i need to do thanks in advance (5 Replies)
Discussion started by: hamsa
5 Replies

2. Shell Programming and Scripting

syntax error: unexpected end of file

Hi, I need ur help is this matter, i have th ebelow script, and i keep getting this error: syntax error: unexpected end of file affectedRow=`cat dbOutput.log | grep "1 row affected"` echo "affectedRow : $affectedRow" if ; then echo "Look to the next OMCDB" ... (10 Replies)
Discussion started by: Alaeddin
10 Replies

3. Shell Programming and Scripting

unexpected end of file error

hi, i am trying to connect to sqlplus in an 'if block' from the script. it is giving unexpected end of file error. and it works fine if it is out of 'if block'. if anybody have idea on this, can you please help me to solve the error ? piece of code is given below. if then... (11 Replies)
Discussion started by: vinayakatj56
11 Replies

4. Shell Programming and Scripting

unexpected end of file error

When I run the following script: #! /bin/bash for var in CA CC CD CT EC PC do cat << EOF > ${var}_full.dat echo T ${var}_high echo C age echo C sex echo C ht echo C WT_lg EOF cat << EOF > ${var}_agesex.dat ... (4 Replies)
Discussion started by: polly_falconer
4 Replies

5. Shell Programming and Scripting

syntax error: unexpected end of file

Hi, I am newbie to UNIX scripting. I am facing this error "syntax error: unexpected end of file" while executing the following script: ------ a=$1 if then sqlplus -s prospect_stg/prospect_stg@mdmpt <<END insert into bckup_marc_parameter_lookup select * from... (6 Replies)
Discussion started by: boopathyvasagam
6 Replies

6. Shell Programming and Scripting

error unexpected end of file

Sometimes while unziping some files i got an error and the further unziping stopped.might be other files are able to be unzip.i.e gunzip a.Z b.Z c.Z gunzip: a.Z: unexpected end of file it found an error on a.Z and stopped but b.Z and C.Z might be correct. why this error comes and is... (2 Replies)
Discussion started by: malikshahid85
2 Replies

7. Shell Programming and Scripting

`end of file' unexpected error

When I am executing my really simple shell script below, I got an error: `end of file' unexpected. Script is suppose to print out a list of supplied parameters. Here is my script: #!/bin/sh a=$# #number or parameters b=0 #starting counter while do b=`expr $b + 1` echo... (9 Replies)
Discussion started by: alexstar
9 Replies

8. Shell Programming and Scripting

syntax error unexpected end of file

I am new to unix, so thank u for ur patience I try to make it work (to duplicate two first columns in several files): #!/bin/bash for i in `seq 2 5` do awk `{ print $1,$1,$2,$2,$3,$4}` final_chr.${i} > input_${i} done and i get ./my_script3.sh: command substitution: line 5: syntax... (2 Replies)
Discussion started by: kush
2 Replies

9. Shell Programming and Scripting

Unexpected End Of File Error

Hi guys, I am new to BASH scripting and I was wondering if anyone could have a look at this code and explain to me why I am getting an Unexpected End of File Error ? If you can that would be great / much appreciated! THANKS! #!/bin/bash USER="" PASS="" if ; then echo "You need to set... (1 Reply)
Discussion started by: spooke
1 Replies

10. Shell Programming and Scripting

Unexpected End of File Syntax Error

Hi, I am brand new to this so I apologize ahead of time for any formatting problems. I know there is a previous (closed) thread on here about this problem but I wasn't able to fix the error following the posts there so I thought I could create a new one. Here is the error I am getting: ... (3 Replies)
Discussion started by: SierraG
3 Replies
exit(1)                                                            User Commands                                                           exit(1)

NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps SYNOPSIS
sh exit [n] return [n] csh exit [ ( expr )] goto label ksh *exit [n] *return [n] DESCRIPTION
sh exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of the last command executed (an EOF will also cause the shell to exit.) return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe- cuted. csh exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the expression expr. The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to jump to a label that occurs between a while or for built-in command and its corresponding end. ksh exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit except for a shell which has the ignoreeof option (See set below) turned on. return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return is invoked while not in a function or a '.' script, then it is the same as an exit. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 15 Apr 1994 exit(1)
All times are GMT -4. The time now is 08:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy