Hi,
I would like to write a sed or awk script to do conversion for
/proc/partitions information to format that is understoodable by most people
Code:
# cat /proc/partitions
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq
8 48 17921835 scsi/host1/bus0/target2/lun0/disc 294 187 3818 1450 3 0 24 0 0 1440 1450
8 49 17920476 scsi/host1/bus0/target2/lun0/part1 293 184 3810 1450 3 0 24 0 0 1440 1450
8 64 17921835 scsi/host1/bus0/target3/lun0/disc 8537 3 68284 40720 1 0 8 0 0 17940 40720
8 65 17920476 scsi/host1/bus0/target3/lun0/part1 8536 0 68276 40710 1 0 8 0 0 17930 40710
8 80 17958274 scsi/host1/bus0/target4/lun0/disc 2077 31422 267956 68450 1 0 8 0 0 38700 68450
8 81 17952606 scsi/host1/bus0/target4/lun0/part1 2076 31419 267948 68450 1 0 8 0 0 38700 68450
from this information I want to convert it to format such as
Code:
/dev/sda
/dev/sda1
/dev/sda2
In doing that I believe the code should be able to do conversion
[0..25] -> [a..z]
Thanks for your help