The ending label of here document (EOF in your case) must be at the beginning of the line unless you have used -EOF which allows the use of tabs (not spaces) at the beginning.
I compiled C program under SUN OS sparcv9 ...I had a problem related to SIGBUS which has been resolved by adding an option to the CC compiler which is memory alignement option ..-memalign=1i as I remmber ...after running the program I got the below error please let me KNow more details what should... (2 Replies)
Hi,
I am getting this error in my shell script, kindly help as soon as possible:
###################################################################
# Main body of program
###################################################################
. /saptech/scripts/common/declare # Defines... (1 Reply)
hi ,
while running this script i am getting below error:
Syntax error at line 11 : `for' is not matched.
here is program:
#! /bin/ksh
sqlplus -s << !+!
user/password
update GR_SUB_SCRIPT_PC set act_del_ind='0';
commit;
exit;
!+!
cd /home/salunke/pvcsfiles/source_files
for i in... (5 Replies)
Help please! :confused:
I have the following error with the following file and the emails are not arriving to the email, any idea please?
ERROR: ./launch_full_backup.sh: Syntax error at line 28 : `else' is not expected.
FECHA=`date +%d%m%y%H%M`... (2 Replies)
Hi,
I am trying to execute the above attached script. and i am getting the error as syntax error at line 8: `<<' is not matched.
While i am trying to run that particular line (cat <<EOF > /tmp/query.sql) independently in the prompt it is running successfully without any error.
I am running... (2 Replies)
I am able to 'Make' some of projects's modules using GNU's make except one where it throws me the following error
gmake -f Makefile
/bin/sh: syntax error at line 1: `if' unexpected
gmake: *** Error 2
I am sure it has nothing to do with the Makefile as there is no 'if' in the first... (1 Reply)
Hi All
I am quite new to Unix. Following is a shell script that i have written and getting the subject mentioned error.
#!/bin/ksh
#-------------------------------------------------------------------------
# File: ang_stdnld.ksh
#
# Desc: UNIX shell script to extract Store information.... (3 Replies)
Hi Everyone,
I am getting strange behavior, same script runs fine without any error in one AIX machine, whereas on another it is throwing this error "0403-057 Syntax error at line 399 : `"' is not matched", I also ran the script in debug mode.
This is the output, still doesn't say anything.... (2 Replies)
Discussion started by: sid1987
2 Replies
LEARN ABOUT BSD
tskipf
TOPEN(3F)TOPEN(3F)NAME
topen, tclose, tread, twrite, trewin, tskipf, tstate - f77 tape I/O
SYNOPSIS
integer function topen (tlu, devnam, label)
integer tlu
character*(*) devnam
logical label
integer function tclose (tlu)
integer tlu
integer function tread (tlu, buffer)
integer tlu
character*(*) buffer
integer function twrite (tlu, buffer)
integer tlu
character*(*) buffer
integer function trewin (tlu)
integer tlu
integer function tskipf (tlu, nfiles, nrecs)
integer tlu, nfiles, nrecs
integer function tstate (tlu, fileno, recno, errf, eoff, eotf, tcsr)
integer tlu, fileno, recno, tcsr
logical errf, eoff, eotf
DESCRIPTION
These functions provide a simple interface between f77 and magnetic tape devices. A ``tape logical unit'', tlu, is ``topen''ed in much the
same way as a normal f77 logical unit is ``open''ed. All other operations are performed via the tlu. The tlu has no relationship at all
to any normal f77 logical unit.
Topen associates a device name with a tlu. Tlu must be in the range 0 to 3. The logical argument label should indicate whether the tape
includes a tape label. This is used by trewin below. Topen does not move the tape. The normal returned value is 0. If the value of the
function is negative, an error has occured. See perror(3F) for details.
Tclose closes the tape device channel and removes its association with tlu. The normal returned value is 0. A negative value indicates an
error.
Tread reads the next physical record from tape to buffer. Buffer must be of type character. The size of buffer should be large enough to
hold the largest physical record to be read. The actual number of bytes read will be returned as the value of the function. If the value
is 0, the end-of-file has been detected. A negative value indicates an error.
Twrite writes a physical record to tape from buffer. The physical record length will be the size of buffer. Buffer must be of type char-
acter. The number of bytes written will be returned. A value of 0 or negative indicates an error.
Trewin rewinds the tape associated with tlu to the beginning of the first data file. If the tape is a labelled tape (see topen above) then
the label is skipped over after rewinding. The normal returned value is 0. A negative value indicates an error.
Tskipf allows the user to skip over files and/or records. First, nfiles end-of-file marks are skipped. If the current file is at EOF, this
counts as 1 file to skip. (Note: This is the way to reset the EOF status for a tlu.) Next, nrecs physical records are skipped over. The
normal returned value is 0. A negative value indicates an error.
Finally, tstate allows the user to determine the logical state of the tape I/O channel and to see the tape drive control status register.
The values of fileno and recno will be returned and indicate the current file and record number. The logical values errf, eoff, and eotf
indicate an error has occurred, the current file is at EOF, or the tape has reached logical end-of-tape. End-of-tape (EOT) is indicated by
an empty file, often referred to as a double EOF mark. It is not allowed to read past EOT although it is allowed to write. The value of
tcsr will reflect the tape drive control status register. See ht(4) for details.
FILES
/usr/lib/libU77.a
SEE ALSO ht(4), perror(3F), rewind(1)4.2 Berkeley Distribution May 15, 1985 TOPEN(3F)