I've used vi editor to write this script, provided permission, but I invoke it
it is prompting end-of-file errors.. I'm not sure what is causing that error..
would like some help.. I've attached details..
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)
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)
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)
Hi,
I have problem in constructing "IF" condition.
The below code throws "tst.sh: line 10: syntax error: unexpected end of file"
#!/bin/ksh
test=9
echo $test
if ]
then
echo "in"
fi
echo "end"
exit 0
Actually, i want to check whether the variable $test is empty or null.
... (5 Replies)
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)
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)
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)
Hi ,
I am new to Unix and this is my first shell script .
I am facing "unexpected end of file error" while executing my code . tried removing blank spaces Unable to trace out the error . PLease help !!!
#!/bin/sh
echo hello
if ]
echo hi
then
var=`cat liq_table_nm.txt`
... (6 Replies)
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)
Hello,
I have another problem with my script. Please accept my apologies, but I am really nooby in sh scripts. I am writing it for first time.
My script:
returned=`tail -50 SapLogs.log | grep -i "Error"`
echo $returned
if ; then
echo "There is no errors in the logs"
fi
And after... (10 Replies)
Discussion started by: jedzio
10 Replies
LEARN ABOUT OSF1
realpath
realpath(3) Library Functions Manual realpath(3)NAME
realpath - Resolves pathname
SYNOPSIS
#include <stdlib.h>
char *realpath(
const char *file_name,
char *resolved_name);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
realpath(): POSIX.1, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
DESCRIPTION
The realpath() function derives, from the file pointed to by file_name, an absolute pathname that names the same file, whose resolution
does not involve ".", "..", or symbolic links. The generated pathname is stored, up to a maximum of PATH_MAX bytes, in the buffer pointed
to by resolved_name.
RETURN VALUES
Upon successful completion, the realpath() function returns a pointer to the resolved name. Otherwise, realpath() returns a null pointer
and sets errno to indicate the error, and the contents of the buffer pointed to by resolved_name are undefined.
ERRORS
If the realpath() function fails, errno may be set to one of the following values: Read or search permission was denied for a component of
file_name. Either the file_name or resolved_name argument is a null pointer. An error occurred while reading from the file system. Too
many symbolic links were encountered in resolving path. The file_name argument is longer than PATH_MAX or a pathname component is longer
than NAME_MAX. A component of file_name does not name an existing file or file_name points to an empty string. Insufficient storage space
available. A component of either path prefix is not a directory.
RELATED INFORMATION
Functions: getcwd(3), sysconf(3)
Standards: standards(5) delim off
realpath(3)