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.
There is (at least) one syntax error in your script. Look at the following, quoted from your post:
After the first and the third line the "do" is missing and some while-loops are not closed.
It pays usually to break up lines and indent properly. Most problems will become easier to track this way.
Hello...
I'm trying to run the sshd script, but I keep geting the Syntax errot message .
Here's the last few lines on the script. set nu in vi shows 58 lines, but I keep getting error referring to line 59. Any help is appreciated.
Thanks,
Remi
else
echo... (4 Replies)
Hi All
I've used UNIX in the past experimenting with commands through terminal but thats about it. Im now currently teaching myself "C".
Using a book from the library, the first chapter asks you run and compile your program from a command-line prompt. As you will see the program is very simple,... (4 Replies)
Hi All,
I have written a korn script (code pasted below). It is giving the error while debugging "new.sh: syntax error at line 62: `end of file' unexpected".
I have re-written the whole code in VI and explored all help related to this error on this Unix forum and tried it. Somehow, I could... (7 Replies)
I have a file called test.dat which contains
a b
I have written a shell script called test.sh
for i in `cat test.dat`
do
echo $i
done
When i run this script using
sh test.sh
I get this message -
test.sh: syntax error at line 6: `end of file' unexpected
What is the... (3 Replies)
Hi,
I'm having a syntax error at line 752: `end of file' unexpected. However, i didn't make any changes on line 752. I just inserted a new code in an existing program. Can anyone please check if there is something wrong with my code:
if
then
lline=`tail -5 $badfile`
... (3 Replies)
Hi All ,
My below script is for chacking vaule and then trucating table :
___________
test4@aceuatcs04:/u01/test4/SOLID/Testscript>cat TRUNCATE-PS_TXN.sh
#--------------------------------------------------------------------
# Created by:Kaushlesh Yadav
# Generated on: 15/07/2010
# Job... (4 Replies)
Hi all,
I am very new to programming and even newer to this forum as well, so I apologize if this should have been in the Newbie category, but...
I am currently trying to figure out Shell Scripting and am running into problems early. Not having taken any kind of programming class, I am not even... (2 Replies)
Hi,
We have installed linux6(RHEL) OS and installed datastage application on that.
First time installation worked fine and our all services related to datastage was up and running.
When we stopped the datastage and restarted its giving below error while restart:-
./uv -admin -start
DataStage... (0 Replies)
1 echo -e "Enter a filename"
2 read filename
3 if
4 then
5 echo -e "do you want to delete?"
6 read answer
7 if
8 then rm myfirst
9 else
10 echo -e "file not deleted"
11 fi
12 exit0 (1 Reply)
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
LEARN ABOUT PHP
filesize
FILESIZE(3) 1 FILESIZE(3)filesize - Gets file sizeSYNOPSIS
int filesize (string $filename)
DESCRIPTION
Gets the size for the given file.
PARAMETERS
o $filename
- Path to the file.
RETURN VALUES
Returns the size of the file in bytes, or FALSE (and generates an error of level E_WARNING) in case of an error.
Note
Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results
for files which are larger than 2GB.
EXAMPLES
Example #1
filesize(3) example
<?php
// outputs e.g. somefile.txt: 1024 bytes
$filename = 'somefile.txt';
echo $filename . ': ' . filesize($filename) . ' bytes';
?>
ERRORS /EXCEPTIONS
Upon failure, an E_WARNING is emitted.
NOTES
Note
The results of this function are cached. See clearstatcache(3) for more details.
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine
which wrappers support stat(3) family of functionality.
SEE ALSO file_exists(3).
PHP Documentation Group FILESIZE(3)