Fibre Channel (SAN)

Reply
Occasional Contributor
Posts: 10
Registered: ‎05-05-2015

FOS command to count characters

What is the Brocade comand to count characters, words, lines etc like wc in the Unix? Thank you. 

External Moderator
Posts: 4,929
Registered: ‎02-23-2004

Re: FOS command to count characters

@iDIGIT

 

wc command AFAIK is the same for both Unix and Linux, but is probable this is disable in FOS

 

did you try to execute the command from admin or root login ?

 

 

TechHelp24
Occasional Contributor
Posts: 10
Registered: ‎05-05-2015

Re: FOS command to count characters

Antonio, I tried following command but got following result:

 

dcxa1:admin> switchshow | grep Online | wc -l
rbash: wc: command not found

External Moderator
Posts: 4,929
Registered: ‎02-23-2004

Re: FOS command to count characters

what happened when you try from root  instead as admin ?

TechHelp24
External Moderator
Posts: 4,929
Registered: ‎02-23-2004

Re: FOS command to count characters

i get answer 3, see below.

 

TH24_6510_FAB5_A_EDGE_1:FID128:root> switchshow | grep Online | wc -l
      3
TH24_6510_FAB5_A_EDGE_1:FID128:root>

 

 

TechHelp24
External Moderator
Posts: 4,929
Registered: ‎02-23-2004

Re: FOS command to count characters

here some example:

 

the switch have 43 SFP Inserted, the output is correct.

 

TH24_6510_FAB5_A_EDGE_1:FID128:root> sfpshow | grep Serial | wc -l
     43
TH24_6510_FAB5_A_EDGE_1:FID128:root>

 

9 License are installed, the output is correct.

 

TH24_6510_FAB5_A_EDGE_1:FID128:root> licenseshow | grep license | wc -l
      9
TH24_6510_FAB5_A_EDGE_1:FID128:root>

 

 

TechHelp24

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.