Sponsored Content
Top Forums Shell Programming and Scripting If statement with unmatched condition Post 302940291 by Don Cragun on Friday 3rd of April 2015 03:51:19 AM
Old 04-03-2015
Is this part of a homework assignment?

What utility are you using to process this statement?

What diagnostic is it printing when you try to compile or run this code?

How are the variables $InputLine and $fields[] defined?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

else unmatched

I'm getting an else unmatched error on the script below.. For info : SYDB is the database name entered as a param on the command line. #Check the DB name HBDB=`sql $SYDB <<_END_ | grep '^|' | grep -v dbase | sed 's/|//g' | sed 's/ //g' set autocommit on; \p\g set lockmode... (7 Replies)
Discussion started by: b.hamilton
7 Replies

2. UNIX for Dummies Questions & Answers

Multiple Condition If statement

Hi, I would like to create an IF statement where if a variable is equal to at least one of 2 (or more) values then the script proceeds. For example: TEST_VAR=2 if ; then echo success! else echo failure fi I understand that the above syntax is wrong but I feel it must be close. Any... (1 Reply)
Discussion started by: msb65
1 Replies

3. Shell Programming and Scripting

`for' unmatched

:b:Hi guys, I am getting this error in this piece of code, Any help will be appreciate rypidoc.shl: syntax error at line 79 : `for' unmatched ##Determine if there is a file to process ls 3526*.dat > /dev/null 2>&1 if then exit fi for i in 3526*.dat do # Capture just the file... (2 Replies)
Discussion started by: rechever
2 Replies

4. Shell Programming and Scripting

Condition statement in perl

#!/usr/bin/perl $output1 = "/home/log.txt" $output2 = "/home/grep.txt" #Statement1 creates an output file called log.txt. #Statement2 greps a line from log.txt and store the result in grep.txt I want to create a condition where if the file grep.txt is empty repeat process. Thanks. (1 Reply)
Discussion started by: sureshcisco
1 Replies

5. Shell Programming and Scripting

An issue with condition statement in shell script

Hello forum members. please go through the below mentioned issue and let me know the right solution. I have to write a script which runs another script .the executable script take input parmeters.so iam writing the the script below . Sample Code:Begins #! /bin/ksh echo " enter... (2 Replies)
Discussion started by: rajkumar_g
2 Replies

6. UNIX for Dummies Questions & Answers

LINUX Multiple condition in IF Statement - Pls help

Hi All, I am trying to put multiple conditions in an IF Statement (using $$). the Linux script somehow doesnt like it. The logic I am trying to implement is as follows, 1. I will first search for DateFile.txt 2. If it exists & there is a P_BUS_DATE value in it, then assign the date value... (5 Replies)
Discussion started by: dsfreddie
5 Replies

7. Shell Programming and Scripting

Unmatched <<

Hi, I am running sinple ksh script . From some reason it failed on the following error: ./ogg_status.sh: syntax error at line 16 : `<<' unmatched Please advise. #!/usr/bin/ksh export ORACLE_HOME=/software/oracle/DB10gR2 export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib... (4 Replies)
Discussion started by: yoavbe
4 Replies

8. Shell Programming and Scripting

If condition and for loop within sed statement

Hi, I tried to go through a lot of online material but could not find concrete solution. My issues is like this : I've got a input file like this : <a> <startDate>19700101000000</startDate> <endDate>20300101000000</endDate> </a> ... (12 Replies)
Discussion started by: Shaishav Shah
12 Replies

9. Shell Programming and Scripting

Two condition in if statement

Hi, I need to put two condition in if statement, but it is not working. Please suggest. if ---------- Post updated at 07:05 AM ---------- Previous update was at 06:55 AM ---------- Also when i put below command in script it is not running, but manually it is running ... (4 Replies)
Discussion started by: learnbash
4 Replies

10. Shell Programming and Scripting

<< unmatched error

Hi all, I want to call a plsql package that does not return any value. I am using the following script to do so: sqlplus $UserNamePwd <<EOF set head off begin test_pkg.procedure('$DebugFlag'); end; exit EOF if then log_message "procedure failed." exit 1 fi exit $? I... (2 Replies)
Discussion started by: reshma15193
2 Replies
QMOVE(P)						     POSIX Programmer's Manual							  QMOVE(P)

NAME
qmove - move batch jobs SYNOPSIS
qmove destination job_identifier ... DESCRIPTION
To move a batch job is to remove the batch job from the batch queue in which it resides and instantiate the batch job in another batch queue. A batch job is moved by a request to the batch server that manages the batch job. The qmove utility is a user-accessible batch client that requests the movement of one or more batch jobs. The qmove utility shall move those batch jobs, and only those batch jobs, for which a batch job_identifier is presented to the utility. The qmove utility shall move batch jobs in the order in which the corresponding batch job_identifiers are presented to the utility. If the qmove utility fails to process a batch job_identifier successfully, the utility shall proceed to process the remaining batch job_identifiers, if any. The qmove utility shall move batch jobs by sending a Move Job Request to the batch server that manages each batch job. The qmove utility shall not exit before the batch jobs corresponding to all successfully processed batch job_identifiers have been moved. OPTIONS
None. OPERANDS
The qmove utility shall accept one operand that conforms to the syntax for a destination (see Destination ). The qmove utility shall accept one or more operands that conform to the syntax for a batch job_identifier (see Batch Job Identifier ). STDIN
Not used. INPUT FILES
None. ENVIRONMENT VARIABLES
The following environment variables shall affect the execution of qmove: LANG Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of IEEE Std 1003.1-2001, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables. LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments). LC_MESSAGES Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. LOGNAME Determine the login name of the user. ASYNCHRONOUS EVENTS
Default. STDOUT
None. STDERR
The standard error shall be used only for diagnostic messages. OUTPUT FILES
None. EXTENDED DESCRIPTION
None. EXIT STATUS
The following exit values shall be returned: 0 Successful completion. >0 An error occurred. CONSEQUENCES OF ERRORS
In addition to the default behavior, the qmove utility shall not be required to write a diagnostic message to standard error when the error reply received from a batch server indicates that the batch job_identifier does not exist on the server. Whether or not the qmove utility waits to output the diagnostic message while attempting to locate the job on other servers is implementation-defined. The following sections are informative. APPLICATION USAGE
None. EXAMPLES
None. RATIONALE
The qmove utility allows users to move jobs between queues. The alternative to using the qmove utility-deleting the batch job and requeuing it-entails considerably more typing. Since the means of selecting jobs based on attributes has been encapsulated in the qselect utility, the only option of the qmove utility concerns authorization. The -u option provides the user with the convenience of changing the user identifier under which the batch job will execute. Minimalism and consistency have taken precedence over convenience; the -u option has been deleted because the equivalent capabil- ity exists with the -u option of the qalter utility. FUTURE DIRECTIONS
None. SEE ALSO
Batch Environment Services , qalter , qselect COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 QMOVE(P)
All times are GMT -4. The time now is 01:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy