Sponsored Content
Top Forums Shell Programming and Scripting Shell grammar question: logical OR in test Post 302723139 by itkamaraj on Monday 29th of October 2012 12:36:41 PM
Old 10-29-2012
try with [[ ]]

Code:
if [[ ! -f /lv8/diamond/shprod/data/hcfadata.dat || ! -f /lv8/diamond/shprod/data/PDPhcfadata.dat  ]]

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Logical Volume Manager question

After creating a make recover tape on a TAC-4 9000/770, the system lost three of five volume groups from the /etc/lvmtab. What would be the best way to recreate the volume groups in the lvmtab? (1 Reply)
Discussion started by: spawarrior
1 Replies

2. AIX

AIX Logical Volume Question

Hi All, There is AIX server which has 2 internal disks running the OS and 8 external disks on a RAID array with RAID 5. My question - is there a way to check which are the logical volumes and file system configured on this RAID array (2 Replies)
Discussion started by: rramanuj
2 Replies

3. AIX

question about a 'test' command

Hi all, I have the following script.Can somone explain what it does.Thanks in advance. if test $# -lt 1 then echo "Message" exit 1 fi (2 Replies)
Discussion started by: sam_78_nyc
2 Replies

4. Shell Programming and Scripting

Logical AND in shell commands

Hi:confused:, I have a file that contains : +-----------------------------------------------------------------------------+ LABEL: super1_fix EFIX FILES: 1 ABSTRACT: epkg for touch command PRE-REQUISITES: no PACKAGER VERSION: 7 REBOOT REQUIRED: no BUILD BOOT... (4 Replies)
Discussion started by: vijaya2006
4 Replies

5. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

6. Shell Programming and Scripting

nested logical expression in bash shell

Please tell me how to nest logical expressions in bash. I would like to nest logical expressions for arguments of the "test" command on bash. The following pseudo-code shows my intention. // pseudo code if (exp1 AND (exp2 OR exp3)) { Output true; } else { Output false; } ... (11 Replies)
Discussion started by: LessNux
11 Replies

7. Shell Programming and Scripting

Logical expression in POSIX compliant Korn Shell

Hi, i want to check if a variable var1 is not a or b or c pseudo code: If NOT (var1 = a or var1 = b or var1 = c) then ... fi I want to use POSIX complaint Korn shell, and for string comparison For the following code, logical.sh #!/usr/bin/ksh var="j" echo "Var : $var" if ! { || ||... (12 Replies)
Discussion started by: ysrini
12 Replies

8. UNIX for Dummies Questions & Answers

Logical OR in shell script

I have code as follows to perform some validations on C++ and Javascript files: if || || ; then However, when I want to add other extensions as well, say "py" or "sql", then the repeated OR starts to look contrived. I know I can use the -o operator to abbreviate the code a little bit, but... (14 Replies)
Discussion started by: figaro
14 Replies

9. Shell Programming and Scripting

Is Rule 7 of POSIX shell grammar rules written correctly?

The POSIX shell standard grammar rules are at Shell Command Language I am trying to understand Rule 7 and I don't. I think there may be some mistakes there. I am not complaining about the standard; rather, I am concerned that my perception is wrong, and I don't understand something important.... (3 Replies)
Discussion started by: Mark_Galeck
3 Replies
CPANPLUS::Shell(3pm)					 Perl Programmers Reference Guide				      CPANPLUS::Shell(3pm)

NAME
CPANPLUS::Shell SYNOPSIS
use CPANPLUS::Shell; # load the shell indicated by your # config -- defaults to # CPANPLUS::Shell::Default use CPANPLUS::Shell qw[Classic] # load CPANPLUS::Shell::Classic; my $ui = CPANPLUS::Shell->new(); my $name = $ui->which; # Find out what shell you loaded $ui->shell; # run the ui shell DESCRIPTION
This module is the generic loading (and base class) for all "CPANPLUS" shells. Through this module you can load any installed "CPANPLUS" shell. Just about all the functionality is provided by the shell that you have loaded, and not by this class (which merely functions as a generic loading class), so please consult the documentation of your shell of choice. BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>. AUTHOR
This module by Jos Boumans <kane@cpan.org>. COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. SEE ALSO
CPANPLUS::Shell::Default, CPANPLUS::Shell::Classic, cpanp perl v5.12.1 2010-04-26 CPANPLUS::Shell(3pm)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy