How to extract IQN from Linux and Windows

Linux

cat /etc/iscsi/initiatorname.iscsi

Windows

(Get-WmiObject -Namespace root\wmi -Class MSiSCSIInitiator_MethodClass).iSCSINodeName
Advertisements

How to perform floating operations with bc?

[vagrant@localhost ~]$ echo 31/2 |  bc
15
[vagrant@localhost ~]$ echo 31/2 |  bc -l
15.50000000000000000000
[vagrant@localhost ~]$ bc -l
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
31/2
15.50000000000000000000