From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id D84892808B for ; Wed, 22 May 2024 04:21:44 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1716344504; b=Y5rVjzUG3VreslD654+rzx0/c237Jki8no7ebEaz/ni5qgHSi00bdTeqBQK97+mF+Mbjj2bfTT FwyZ0zlTA5vT5WWxyN9JJClc5JnTqmT/ox+zz9WPdVVynR/GQjYJXqBwelV2Q47Y2a44MxqqPq ZTJLf9eiEfw7yxlFeMur/iLh5PE1QeNf86cUbXyTU6Q4gZ+uWwNO+i2sCgtrEVGkZGktSiuT2Y QTMIUzqFKsO/i3nrOiCHXZq2hx247Zr1v7zkxaKzzOJ063ghtPPNRlSBLJ3AQnufe42WwEPJ13 o5OakG21QJtrqjzbRPXsUThIKvtD6rHmOz0gBPhSki4vtQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1716344504; bh=9zKmfr9VteUqCXtgz61rlWF4rLDHx+DQd1vI7ay+OS0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=X4AuOUll0KwMnin+M3+YoL/mCBOy4kBGxJU3usQ3dPDAyhwe3LOceICds0FKaHU2KLhESoUCrU gLD8tIZWbkj4i+eQHm+SBgnMVBMwWbfcB1E4dDB4Ll/9Q/AkmVdLyZTxryCjtcm5xmjailbsVh 4HoZwVEttsdSAM24b4ghxW0NG4q2qerw47ILqydTJR2RMVLf4QZKRoixKua4mOoJ2prBk4/Xwr liRY/wCPG6EHDG9eBgl3Iqt3UzFbdX2+/nirc6VQPWxbQz8XjrnxCD+IK+WcLO5Q5YIJohH45I 5ELYpSW069kmeztS6dm+iIpPDPT1QZMrBmdg9S5CGLKceg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Uzxs0qQY0SUCprOwUfh7dd7PJ82i2/jqCxs/PPG7kl4=; b=YSs7Se8CntwRpr/3x//c4w9S6m 3nbFAiwUcwwLUCNFOQja3Jg1eHPf5mrFexFc+ylbXzSNjROmS94aGdag3Kj6jYQ44nH1LS3rpMvXu pv75Zg57k/7JzI2GSJFFQ7GjIVle+Iqrazp36QJ2mLAwek697+dt1JuSQ3ds0RUKV9VMUDFJCnxQg pd/4VoztfaINs8sk3iaefUthJZhj1oGTN2Bbef+ZCaaOKP1PPX7P3GfGTYxNv01oaqnr+eJGqRZ85 OdwXzNLySCXZmqou0+CGgBWj1NIVag1VJS3Lu1lrQ3sVLGAmd3oMQ5SPmoVi8jbMcHQTfucuUXSf8 /jtgeWXg==; Received: by zero.zsh.org with local id 1s9bbr-0007CR-WE; Wed, 22 May 2024 02:21:44 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:51371) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s9bbC-0006NI-HR; Wed, 22 May 2024 02:21:02 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta01.eastlink.ca ([24.224.136.30]) with ESMTPS id <0SDV1W8S47URGMM0@mta01.eastlink.ca> for zsh-users@zsh.org; Tue, 21 May 2024 23:21:01 -0300 (ADT) Received: from [192.168.0.15] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id 9bbAsbPze98ni9bbAsxyqU (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Tue, 21 May 2024 23:21:01 -0300 X-Authority-Analysis: v=2.4 cv=C75KyhP+ c=1 sm=1 tr=0 ts=664d568d a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=pEgzdnBU7XMv0sAP05AA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=PaMZVUXegiRFw00GXHEA:9 a=DwLQEYk_FQ8D87LU:21 a=_W_S_7VecoQA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeifedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduhegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------boD1XZsKtKhpAVcugHUndgwv" Message-id: <0b6a048b-4fbf-4162-a31a-d5f6f963d72a@eastlink.ca> Date: Tue, 21 May 2024 19:21:00 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: the splits To: zsh-users@zsh.org References: <75784205-3d78-4dd8-8474-e2eb48598307@eastlink.ca> Content-language: en-US From: Ray Andrews In-reply-to: X-Seq: 29963 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: This is a multi-part message in MIME format. --------------boD1XZsKtKhpAVcugHUndgwv Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-05-21 18:48, Mark J. Reed wrote: > Running *lsof* *| grep* seems a bit silly. Can't you just do *lsof > $mountpoint*? > > When I want to select columns I usually reach for *awk*: > > *sudo lsof $mountpoint | awk '{print $1, $NF}'* > > Beautiful, nuts' I just presumed I needed to grep for that. Much faster your way.  As for awk, I don't know anything about it, but googling for help on various issues, one sees awk coming to the rescue all the time.  I half way learned sed, but I think I should have learned awk. One little thing, can I have the first and last columns, but with a tab between, or some other columnizer?: COMMAND    NAME zsh        /mnt/sda/5/boot geany      /mnt/sda/5/boot --------------boD1XZsKtKhpAVcugHUndgwv Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-05-21 18:48, Mark J. Reed wrote:
Running lsof | grep seems a bit silly. Can't you just do lsof $mountpoint?

When I want to select columns I usually reach for awk:

 sudo lsof $mountpoint | awk '{print $1, $NF}'

Beautiful, nuts' I just presumed I needed to grep for that. Much faster your way.  As for awk, I don't know anything about it, but googling for help on various issues, one sees awk coming to the rescue all the time.  I half way learned sed, but I think I should have learned awk. One little thing, can I have the first and last columns, but with a tab between, or some other columnizer?:

COMMAND    NAME
zsh        /mnt/sda/5/boot
geany      /mnt/sda/5/boot


--------------boD1XZsKtKhpAVcugHUndgwv--