Sponsored Content
Top Forums Shell Programming and Scripting Help with ksh using OR condition Post 302587355 by mbak on Wednesday 4th of January 2012 04:28:02 PM
Old 01-04-2012
Help with ksh using OR condition

Here is the below output from OS AIX6.1, the 1st lsdev output is using Virtual adapters and the other one physical.

Code:
#lsdev -Cc adapter | grep fcs | grep "Virtual"
fcs0 Available 00-T1 Virtual Fibre Channel Client Adapter
fcs1 Available 01-T1 Virtual Fibre Channel Client Adapter
fcs2 Available 00-T1 Virtual Fibre Channel Client Adapter
fcs3 Available 01-T1 Virtual Fibre Channel Client Adapter

#lsdev -Cc adapter | grep fcs | grep -v "Virtual"
fcs0   Available 03-08 FC Adapter
fcs1   Available 01-08 FC Adapter

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If and Or Condition in Unix [ksh]

I have the code below. I want to said If TrackErrors > 0 or count == 0 then MailErrors else MailSuccess fi. if then MailErrors ${count} else MailSuccess ${count} fi Any helps greatly appreciated. (2 Replies)
Discussion started by: leemjesse
2 Replies

2. Shell Programming and Scripting

combination between || and && in IF condition with ksh

Dear All, Please advice about this issue. when i run this line in a script if && || && || && if i enter $x = test3 and $y = test1 the If condition apply while it should not Best Regards (2 Replies)
Discussion started by: islam.said
2 Replies

3. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

4. HP-UX

Difference between [condition] and [[condition]] and ((condition)) when used with if condition

Executed the following if conditions .. and got different results . only (( )) gave correct o/p with all scenarios . Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition. And why each condition gave different result. 1.... (2 Replies)
Discussion started by: soumyabubun
2 Replies

5. Shell Programming and Scripting

syntax of if condition in ksh is wrong

The syntax of 'if' conditionals in bash and ksh seems different. I am trying to check for a particular version using 'if' in ksh. This very simple syntax gives syntax error. I have tried many variants, but no go. Please correct the syntax. Later I will expand it to 'if' and 'else'. #!/bin/ksh... (8 Replies)
Discussion started by: nivedhitha
8 Replies

6. Shell Programming and Scripting

redirect stdout echo command in condition A run in condition B

hi, I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command Here are my simple script After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies

7. Shell Programming and Scripting

ksh: how to extract strings from each line based on a condition

Hi , I'm a newbie.Never worked on Unix before. I want a shell script to perform the following: I want to extract strings from each line ,based on the type of line(Nameline,Subline) and output it to another file.Below is a sample format. 2010-12-21 14:00"1"Nameline"Midterm"First Name:Jane ... (4 Replies)
Discussion started by: angie1234
4 Replies

8. UNIX for Dummies Questions & Answers

if condition in ksh

in my code if condition is not working. i am using array in the if condition the code: set -A rt 0 1 7 13 21 echo "Please enter a choice" read choice; for i in 0 1 2 3 4 do if }] then echo "something" fi done (6 Replies)
Discussion started by: jeanzibbin
6 Replies

9. Shell Programming and Scripting

If condition return 0 even when it fails to satisfy te condition

HI My doubt may be basic one but I need to get it clarified.. When i use "if" condition that checks for many AND, OR logical conditions like if ]; then return 0 fi Even the if condition fails it returns as zero.. Any clue.. But if i add else condition like if ]; ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

10. Shell Programming and Scripting

ksh : Building an array based on condition result

I want to build an Errorlog. I would like to build an array as I move through the if statements and print the array once all error conditions have been defined. The results need to be comma delimited. tsver will be static "1.9.6(2)" other vars $prit $lt $rt can have the same or a different... (1 Reply)
Discussion started by: popeye
1 Replies
MPT(4)							   BSD Kernel Interfaces Manual 						    MPT(4)

NAME
mpt -- LSI Fusion-MPT SCSI/Fibre Channel driver SYNOPSIS
mpt* at pci? dev ? function ? scsibus* at mpt? DESCRIPTION
The mpt driver provides support for the LSI Logic Fusion-MPT family of SCSI and Fibre Channel and SAS controllers: o 53c1020 (Ultra320 SCSI) o 53c1030 (Dual Ultra320 SCSI) o AS1068 (SAS/SATA) o FC909 (1Gb/s Fibre Channel) o FC909A (Dual 1Gb/s Fibre Channel) o FC919 (2Gb/s Fibre Channel) o FC919X (2Gb/s Fibre Channel, PCI-X) o FC929 (Dual 2Gb/s Fibre Channel) o FC929X (Dual 2Gb/s Fibre Channel, PCI-X) SEE ALSO
cd(4), ch(4), intro(4), pci(4), scsi(4), sd(4), siop(4), st(4), uk(4) HISTORY
The mpt driver first appeared in NetBSD 2.0. AUTHORS
The mpt driver was originally written for FreeBSD by Greg Ansley . It was ported to NetBSD by Jason R. Thorpe and contributed by Wasabi Sys- tems, Inc. BSD
February 16, 2009 BSD
All times are GMT -4. The time now is 08:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy