| 4 | | |
| 5 | | '''Concerning awk''', shouldn't it be the following ? |
| 6 | | |
| 7 | | (print instead of printf, and I added a third VG for the third %s) |
| 8 | | {{{ |
| 9 | | mr_asprintf(&command, "mount 2>/dev/null|grep -E \"/dev/mapper/%s-|/dev/%s/\"|awk '{print(\"%%s \",$3)}END{print \"\"}'", VG, VG, VG); |
| 10 | | }}} |
| 11 | | |
| 12 | | Example : |
| 13 | | |
| 14 | | {{{ |
| 15 | | # mount 2>/dev/null|grep -E "/dev/mapper/VGDD0-|/dev/VGDD0/" |
| 16 | | /dev/mapper/VGDD0-LVDD0 on /mnt/data0 type ext3 (rw) |
| 17 | | |
| 18 | | # mount 2>/dev/null|grep -E "/dev/mapper/VGDD0-|/dev/VGDD0/" |awk '{print("%VGDD0 ",$3)}END{print ""}' |
| 19 | | %VGDD0 /mnt/data0 |
| 20 | | }}} |