>>> Eric Robinson <eric.robin...@psmnv.com> schrieb am 18.05.2021 um 08:58 in Nachricht <sa2pr03mb5884fdfae54573c4b86b4f8bfa...@sa2pr03mb5884.namprd03.prod.outlook.com>
>> ‑‑‑‑‑Original Message‑‑‑‑‑ >> From: Users <users‑boun...@clusterlabs.org> On Behalf Of Ulrich Windl >> Sent: Tuesday, May 18, 2021 12:51 AM >> To: users@clusterlabs.org >> Subject: [ClusterLabs] Antw: [EXT] Re: DRBD + VDO HowTo? >> >> >>> Eric Robinson <eric.robin...@psmnv.com> schrieb am 17.05.2021 um >> 20:28 in >> Nachricht >> <SA2PR03MB5884DD970AC5ED0EA56758EFFA2D9@SA2PR03MB5884.namprd >> 03.prod.outlook.com> >> > R=$(/usr/bin/vdo status ‑n $VOL|grep Activate|awk '{$1=$1};1'|cut >> >> I just wonder: What is "awk '{$1=$1};1'" supposed to do? >> > > It replaces all whitespace, including tabs, with single spaces, which makes > it easy to parse with cut. > >> I also believe that "grep Activate|awk '{$1=$1};1'|cut ‑d" " ‑f2)" can be done >> in one awk command. > > I'm sure it could, if I had ever taken time to learn awk. I'm not using VDO, but my guess would be: awk '/Activate/ { print $2 }' Probably the "/Activate/" part could be improved making the match more specific, but I would have to see the command output... Regards, Ulrich > >> >> Regards, >> Ulrich >> >> >> _______________________________________________ >> Manage your subscription: >> https://lists.clusterlabs.org/mailman/listinfo/users >> >> ClusterLabs home: https://www.clusterlabs.org/ > Disclaimer : This email and any files transmitted with it are confidential > and intended solely for intended recipients. If you are not the named > addressee you should not disseminate, distribute, copy or alter this email. > Any views or opinions presented in this email are solely those of the author > and might not represent those of Physician Select Management. Warning: > Although Physician Select Management has taken reasonable precautions to > ensure no viruses are present in this email, the company cannot accept > responsibility for any loss or damage arising from the use of this email or > attachments. > _______________________________________________ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ _______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/