Sponsored Content
Top Forums Shell Programming and Scripting Error after I added several lines Post 302994824 by digioleg54 on Tuesday 28th of March 2017 01:26:34 PM
Old 03-28-2017
Error after I added several lines

I have added several lines to my code
Code:
 let cnt=0
  if [ ${sftp_name} = "EOMMSRPT" ]
        then
                if [ ${cnt} -eq 0 ]
                then
                        cnt=`expr ${cnt} + 1`
                        sftp_name=EOMMSRPT1
                        echo "EOMsftpname = ${sftp_name}" >> ${LOGF}
                else
                        sftp_name=EOMMSRPT2
                        echo "EOMsftpname = ${sftp_name}" >> ${LOGF
                fi
  fi

Now when I run the script, it has an error
Code:
 /sftp_ondemand_monthly.sh[76]: syntax error at line 150 : `>' unexpected

What should wrong with it?

Thanks for contribution

---------- Post updated at 01:26 PM ---------- Previous update was at 01:17 PM ----------

Found the problem
Code:
 echo "EOMsftpname = ${sftp_name}" >> ${LOGF

must be the second
Code:
 ${LOGF}

This User Gave Thanks to digioleg54 For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to scan only new lines added in file?

Hi, I am planning to implement a scheduled script that will go against my log files (every hour), search for a set of key words (errors, exceptions, faults etc). The script must be intelligent enough to scan only the new lines added to the log file since it last ran. I can use grep for... (3 Replies)
Discussion started by: redlotus72
3 Replies

2. Shell Programming and Scripting

New Person Added to the Forum

Hello, I'm brand new to this forum. I am working on my first Bash shell script. We were given an exercise to get ready for the real assignment. I could use some help. The exercise is to "set two variables (i. e., file1 & file2) on the command line to the paths of the text files. We are to... (1 Reply)
Discussion started by: wcarp05
1 Replies

3. Programming

How come nothing is added to utmp in this case?

Given the following: #include <string.h> #include <stdlib.h> #include <pwd.h> #include <unistd.h> #include <utmp.h> #include <stdio.h> #include <time.h> int main(int argc, char *argv) { struct utmp entry; char *fd; system("echo before adding entry:;who"); ... (1 Reply)
Discussion started by: frequency8
1 Replies

4. UNIX for Dummies Questions & Answers

Routes being automatically added

Hello, I have two AIX 5.3 servers that are supposedly set up exactly the same. The problem I am having is on one of the servers, it seems dynamic routes are being added mysteriously and non-periodically. This only happens on one server and not the other. Also, there doesn't seem to be a specific... (1 Reply)
Discussion started by: Conutmonky
1 Replies

5. Shell Programming and Scripting

Unique value added

Guys, I am trying to get unique numbers which i can use as a primary key in a table. I tried using the <seconds_since_epoch>.<hostname> combination but since more than one process can run on the same machine at the same time, this won't be unique either. Can anyone tell me another way to do... (2 Replies)
Discussion started by: garric
2 Replies

6. UNIX for Dummies Questions & Answers

Perl: added to an element

I'm trying to add a string to the end of each element in an array. I have filled an array using grep: for ($i = 0; $i <= $#array} - 1; $i++) { push (@data,qx(grep '$array' $file)); } } Now i want to add something to the end of the array. For example if my... (3 Replies)
Discussion started by: WongSifu
3 Replies

7. Red Hat

Static route not added

Hello Guys.. I am facing this weird problem of static route not added after reboot!! Following is my route-<interface> file.. # cat /etc/sysconfig/network-scripts/route-eth0 ADDRESS0=172.31.0.1 NETMASK0=255.255.255.255 GATEWAY0=192.168.208.1 ADDRESS1=172.31.15.2... (3 Replies)
Discussion started by: parth_buch
3 Replies

8. AIX

LPAR cannot added disk

Dear All, I created a new partition through "Integrated Virtualization Manager" but there have an error when I added a new disk to the partition. The disk already created without any issue, Below error is to add the disk to the partition An error occured while modifying the assignments... (5 Replies)
Discussion started by: lckdanny
5 Replies

9. UNIX for Beginners Questions & Answers

Added Two Arrays But With Errors

Please could someone have a look at the code below and spot the cause of the error. Thanks in advance. CODE BELOW: (code tags now added) My apologies please, that was my first time here.:) #! /bin/bash # file: whileloop.sh arr1=(2 4 6 8) arr2=(3 6 9 12) arr3=() indextotal=(${#arr1})... (4 Replies)
Discussion started by: Chiadi
4 Replies
NOTIFY(3PVM)							  PVM Version 3.4						      NOTIFY(3PVM)

NAME
pvm_notify - Request notification of PVM event such as host failure. SYNOPSIS
C int info = pvm_notify( int what, int msgtag, int cnt, int *tids ) Fortran call pvmfnotify( what, msgtag, cnt, tids, info ) PARAMETERS
what Type of event to trigger the notification. Presently one of: Value Meaning PvmTaskExit Task exits or is killed PvmHostDelete Host is deleted or crashes PvmHostAdd New host is added msgtag Message tag to be used in notification. cnt For PvmTaskExit and PvmHostDelete, specifies the length of the tids array. For PvmHostAdd, specifies the number of times to notify. tids For PvmTaskExit and PvmHostDelete, an array of length cnt of task or pvmd TIDs to be notified about. The array is not used with the PvmHostAdd option. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_notify requests PVM to notify the caller on detecting certain events. One or more notify messages (see below) are sent by PVM back to the calling task. The messages have tag msgtag supplied to notify. The notification messages have the following format: PvmTaskExit One notify message for each TID requested. The message body contains a single TID of exited task. PvmHostDelete One notify message for each TID requested. The message body contains a single pvmd-TID of exited pvmd. PvmHostAdd cnt notify messages are sent, one each time the local pvmd's host table is updated. The message body contains an integer length followed by a list of pvmd-TIDs of new pvmds. The counter of PvmHostAdd messages yet to be sent is replaced by successive calls to pvm_notify. Specifying a cnt of -1 turns on PvmHostAdd messages until a future notify; a count of zero disables them. TIDs in the notify messages are packed as integers. The calling task is responsible for receiving messages with the specified tag and taking appropriate action. Future versions of PVM may expand the list of available notification events. EXAMPLES
C: info = pvm_notify( PvmTaskExit, 9999, ntask, tids ); Fortran: CALL PVMFNOTIFY( PVMHOSTDELETE, 1111, NUMHOSTS, DTIDS, INFO ) To "cancel" a notify request in PVM, the pvm_notify routine can be re-invoked with an additional PvmNotifyCancel flag in the what argument. The remaining arguments to this cancelling invocation must match the original invocation exactly, aside from the additional PvmNotifyCancel which can be added(+) or OR-ed(|) to the what argument: pvm_notify( PvmTaskExit, 9999, ntask, tids ); . . . pvm_notify( PvmTaskExit | PvmNotifyCancel, 9999, ntask, tids ); Note that when a notify is cancelled, the notify message is delivered, as if the given event (i.e. task exit, host add or delete) had occurred. ERRORS
PvmSysErr pvmd not responding. PvmBadParam giving an invalid argument value. SEE ALSO
pvm_tasks(3PVM), pvm_config(3PVM) 31 January, 1994 NOTIFY(3PVM)
All times are GMT -4. The time now is 11:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy