From: Andrew Udvare <audvare@gmail.com>
To: Gentoo Users <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] HOWTO: Freezing/unfreezing (groups of) processes
Date: Fri, 5 Feb 2021 03:46:45 -0500 [thread overview]
Message-ID: <AA56AA93-4428-49FD-A77B-96633CB8867D@gmail.com> (raw)
In-Reply-To: <YBz3nb67JhsfkEfx@waltdnes.org>
> On 2021-02-05, at 02:45, Walter Dnes <waltdnes@waltdnes.org> wrote:
>
> done < /dev/shm/temp.txt
You don't need to write a temporary file. You can pipe this directly into the while loop:
while read
do
...
done < <(ps -ef | grep ${1} | grep -v "grep ${1}" | grep -v pstop)
Also to avoid the second grep in Bash at least:
grep "[${1:0:1}]${1:1}"
$ ps -ef | grep '[l]vmetad'
root 965 1 0 Jan31 ? 00:00:00 /sbin/lvmetad -f
^ No grep in output.
--
Andrew
next prev parent reply other threads:[~2021-02-05 8:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 7:45 [gentoo-user] HOWTO: Freezing/unfreezing (groups of) processes Walter Dnes
2021-02-05 8:46 ` Andrew Udvare [this message]
2021-02-05 19:00 ` Walter Dnes
2021-02-05 18:24 ` Walter Dnes
2021-02-05 22:42 ` Matt Connell (Gmail)
2021-02-06 7:54 ` Walter Dnes
2021-02-05 11:55 ` Rich Freeman
2021-02-05 19:07 ` Walter Dnes
2021-02-05 14:39 ` Rich Freeman
2021-02-05 16:23 ` Neil Bothwick
2021-02-06 1:08 ` David Haller
2021-02-06 4:46 ` Paul Colquhoun
2021-02-05 12:12 ` Ramon Fischer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AA56AA93-4428-49FD-A77B-96633CB8867D@gmail.com \
--to=audvare@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox