Friends, I have fdisk -l
output in one file called test1.txt
.
Now I want to get the device name only using awk
.
How to get a device name?
I want output like this:
/dev/sda1
/dev/sda2
/dev/sda3
/dev/sdb1
/dev/sdc1
Assuming this correlates to your |
||||
|
I don't see any reason to do this using fdisk and awk -- just get the device names from
If you only want the partitions and not whole disks, limit the glob to look for a number in the name:
You can also query
|
|||||||||
|
awk
bit from your question. As was stated on the other Q you asked with a similar title it isn't relevant. unix.stackexchange.com/questions/117739/… – slm♦ Mar 2 '14 at 7:49