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

Eric Robinson eric.robinson at psmnv.com
Tue May 18 02:58:55 EDT 2021

> -----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.

> 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.

More information about the Users mailing list