Apr-09-2022, 03:38 PM
I have this :
v_num_distinct_phy_disks_in_cells=os.system('cat /tmp/p_count_num_phy_disks_all_cell | sort -u | wc -l')The content of file is :
cat /tmp/p_count_num_phy_disks_all_cell 12 12 12If I run manually it shows correct as value of distinct number is 1:
cat /tmp/p_count_num_phy_disks_all_cell | sort -u | wc -l 1If I run in Python I get this:
>>> v_num_distinct_phy_disks_in_cells=os.system('cat /tmp/p_count_num_phy_disks_all_cell | sort -u | wc -l') 1 >>> print(v_num_distinct_phy_disks_in_cells) -1Why it is showing -1 ?