[ClusterLabs] Antw: Re: Antw: [EXT] Re: DRBD + VDO HowTo?

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue May 18 04:03:11 EDT 2021


>>> Eric Robinson <eric.robinson at psmnv.com> schrieb am 18.05.2021 um 08:58 in
Nachricht
<SA2PR03MB5884FDFAE54573C4B86B4F8BFA2C9 at SA2PR03MB5884.namprd03.prod.outlook.com>

>>  ‑‑‑‑‑Original Message‑‑‑‑‑
>> From: Users <users‑bounces at clusterlabs.org> On Behalf Of Ulrich Windl
>> Sent: Tuesday, May 18, 2021 12:51 AM
>> To: users at clusterlabs.org 
>> Subject: [ClusterLabs] Antw: [EXT] Re: DRBD + VDO HowTo?
>>
>> >>> Eric Robinson <eric.robinson at psmnv.com> schrieb am 17.05.2021 um
>> 20:28 in
>> Nachricht
>> <SA2PR03MB5884DD970AC5ED0EA56758EFFA2D9 at 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/ 





More information about the Users mailing list