Code: Select all
sda1|M|
sda3|M|
sda5||
sda6|M|
sdb1||
sdb5||
sr0||
sr1||
Code: Select all
echo "$(</tmp/drvinfo)" |sed "s/\(${1}||\).*/\1{B}/" > /tmp/drvinfo
I also need to write and remove the middle position, like this: " sda3|M| " and "sda3||"
So for a given row (record) I need to write a given column (field) independantly.
I could do this in several lines of code, but I`m sure sed will probably do it in one line...