Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Steal my cash, car and TV - but leave the computer! -- Soenke Lange <soenke@escher.north.de>


computers / alt.os.linux.mageia / Misunderstanding sed command

SubjectAuthor
* Misunderstanding sed commandGrimble
+* Misunderstanding sed commandDavid W. Hodgins
|`- Misunderstanding sed commandGrimble
+* Misunderstanding sed commandMichael Wood
|`* Misunderstanding sed commandred floyd
| `* Misunderstanding sed commandWilliam Unruh
|  `- Misunderstanding sed commandred floyd
`- Misunderstanding sed commandWilliam Unruh

1
Re: Misunderstanding sed command

<u3jr2d$17joe$1@dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=5593&group=alt.os.linux.mageia#5593

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: unruh@invalid.ca (William Unruh)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Thu, 11 May 2023 22:43:25 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <u3jr2d$17joe$1@dont-email.me>
References: <u3dkob$9jlo$1@dont-email.me>
<ak5qij-4d6.ln1@skutter.czi.org.uk> <u3hf0b$rnre$1@redfloyd.dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 May 2023 22:43:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b3c1d3ea2ba9ca40341556d190fb9b2c";
logging-data="1298190"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198r6JrDgBJLluy6HbE4sZY"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:R0tnIKRhegZeq5mBzwKWjOnBv3Y=
 by: William Unruh - Thu, 11 May 2023 22:43 UTC

On 2023-05-11, red floyd <no.spam.here@its.invalid> wrote:
> On 5/9/2023 8:31 AM, Michael Wood wrote:
>> sed is acting on stdout, but the errors get written to stderr.  You can
>> re-direct stderr to stdout, to get the sed to work using:
>> du -d 1 2>&1 | sed '/du:/d'
>>
>
> OP doesn't want the stderr. So the previously discussed
>
> du -d 1 2> /dev/null | sed '/du:/d'
>
> is the proper answer here.

Except all of the lines with du: in them are from stderr, not stdout.
so
du -d 1 2> /dev/null
would be enough. However there might be other lines in stderr that he
wants to see. Certainly his post says he only wanted to get rid of the
lines with du: in them.

Re: Misunderstanding sed command

<u3mdcb$1qo8k$1@redfloyd.dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=5594&group=alt.os.linux.mageia#5594

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam.here@its.invalid (red floyd)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Fri, 12 May 2023 15:08:11 -0700
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u3mdcb$1qo8k$1@redfloyd.dont-email.me>
References: <u3dkob$9jlo$1@dont-email.me> <ak5qij-4d6.ln1@skutter.czi.org.uk>
<u3hf0b$rnre$1@redfloyd.dont-email.me> <u3jr2d$17joe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 12 May 2023 22:08:11 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="ec6355cbcd0e62755fb4b4eddc5b64d3";
logging-data="1925396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PJXk6RuZPA+On2IVbbYliMZAiLlQ6EZ0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:yjCiK7JzrK6KfM4T9/Hh+nkbTYo=
In-Reply-To: <u3jr2d$17joe$1@dont-email.me>
Content-Language: en-US
 by: red floyd - Fri, 12 May 2023 22:08 UTC

On 5/11/2023 3:43 PM, William Unruh wrote:
> On 2023-05-11, red floyd <no.spam.here@its.invalid> wrote:
>> On 5/9/2023 8:31 AM, Michael Wood wrote:
>>> sed is acting on stdout, but the errors get written to stderr.  You can
>>> re-direct stderr to stdout, to get the sed to work using:
>>> du -d 1 2>&1 | sed '/du:/d'
>>>
>>
>> OP doesn't want the stderr. So the previously discussed
>>
>> du -d 1 2> /dev/null | sed '/du:/d'
>>
>> is the proper answer here.
>
> Except all of the lines with du: in them are from stderr, not stdout.
> so
> du -d 1 2> /dev/null
> would be enough. However there might be other lines in stderr that he
> wants to see. Certainly his post says he only wanted to get rid of the
> lines with du: in them.

Agreed.

Misunderstanding sed command

<u3dkob$9jlo$1@dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6621&group=alt.os.linux.mageia#6621

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: grimble@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Misunderstanding sed command
Date: Tue, 9 May 2023 15:18:44 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <u3dkob$9jlo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 9 May 2023 14:18:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bb8fa7f3f93e14ea326dc7af8e0b7797";
logging-data="315064"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kOyIvbiXofxU2xfFYrkdD"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:LrBA5rEz3tquZu+2ZKVod7lmDK0=
Content-Language: en-GB
 by: Grimble - Tue, 9 May 2023 14:18 UTC

Using du -d 1 to get some directory sizes, I also get many
du: cannot access.../read... messages
I thought to suppress them by piping them to sed
du -d 1 | sed '/du:/d'
but doesn't work. Am I misunderstanding the sed command?
--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.98-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64

Re: Misunderstanding sed command

<op.14onbzkpa3w0dxdave@hodgins.homeip.net>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6622&group=alt.os.linux.mageia#6622

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Tue, 09 May 2023 11:15:25 -0400
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <op.14onbzkpa3w0dxdave@hodgins.homeip.net>
References: <u3dkob$9jlo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="9ce6bdd784076d292fe2219d8cf0320b";
logging-data="328680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190lSBhZ/pU/fDyKI3WJ3Ba5TlimT2sWlU="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:K576sK66xxIjERBk5jzryyVJLFk=
 by: David W. Hodgins - Tue, 9 May 2023 15:15 UTC

On Tue, 09 May 2023 10:18:44 -0400, Grimble <grimble@nomail.afraid.org> wrote:

> Using du -d 1 to get some directory sizes, I also get many
> du: cannot access.../read... messages
> I thought to suppress them by piping them to sed
> du -d 1 | sed '/du:/d'
> but doesn't work. Am I misunderstanding the sed command?

[dave@x3 home]$ pwd
/home
[dave@x3 home]$ du -d 1
6.0G ./dave
4.0K ./rpms
du: cannot read directory './garage/.dbus': Permission denied
du: cannot read directory './garage/.ssh': Permission denied
du: cannot read directory './garage/.gnupg': Permission denied
du: cannot read directory './garage/tmp': Permission denied
76K ./garage
du: cannot read directory './tester/.dbus': Permission denied
du: cannot read directory './tester/.local': Permission denied
du: cannot read directory './tester/.cache/chromium': Permission denied
du: cannot read directory './tester/.cache/dconf': Permission denied
du: cannot read directory './tester/.cache/gvfs': Permission denied
du: cannot read directory './tester/.cache/mozilla': Permission denied
du: cannot read directory './tester/.cache/doc': Permission denied
du: cannot read directory './tester/.pki': Permission denied
du: cannot read directory './tester/.gnupg': Permission denied
du: cannot read directory './tester/.config/chromium': Permission denied
du: cannot read directory './tester/.config/ibus': Permission denied
du: cannot read directory './tester/.config/pulse': Permission denied
du: cannot read directory './tester/.config/dconf': Permission denied
du: cannot read directory './tester/tmp': Permission denied
du: cannot read directory './tester/.mozilla/firefox': Permission denied
2.8G ./tester
8.8G .
[dave@x3 home]$ du -d 1 2>/dev/null
6.0G ./dave
4.0K ./rpms
76K ./garage
2.8G ./tester
8.8G .
[dave@x3 home]$

The error messages from the du command go to STDERR, not STDOUT. The sed command
is only seeing the non-error output.

With "du -d 1 2>/dev/null" the good output still goes to STDOUT, but the error
messages are suppressed by redirecting them to the null output device.

Regards, Dave Hodgins

Re: Misunderstanding sed command

<u3dqf0$aa82$1@dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6623&group=alt.os.linux.mageia#6623

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: grimble@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Tue, 9 May 2023 16:56:14 +0100
Organization: A noiseless patient Spider
Lines: 62
Message-ID: <u3dqf0$aa82$1@dont-email.me>
References: <u3dkob$9jlo$1@dont-email.me>
<op.14onbzkpa3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 9 May 2023 15:56:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bb8fa7f3f93e14ea326dc7af8e0b7797";
logging-data="338178"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uEIsZ0/fC1TNtlaFJCmCh"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:Z1hIM4JZ8c+kgMPTaCn/yeVA7N0=
Content-Language: en-GB
In-Reply-To: <op.14onbzkpa3w0dxdave@hodgins.homeip.net>
 by: Grimble - Tue, 9 May 2023 15:56 UTC

On 09/05/2023 16:15, David W. Hodgins wrote:
> On Tue, 09 May 2023 10:18:44 -0400, Grimble <grimble@nomail.afraid.org>
> wrote:
>
>> Using du -d 1 to get some directory sizes, I also get many
>> du: cannot access.../read... messages
>> I thought to suppress them by piping them to sed
>> du -d 1 | sed '/du:/d'
>> but doesn't work. Am I misunderstanding the sed command?
>
> [dave@x3 home]$ pwd
> /home
> [dave@x3 home]$ du -d 1
> 6.0G    ./dave
> 4.0K    ./rpms
> du: cannot read directory './garage/.dbus': Permission denied
> du: cannot read directory './garage/.ssh': Permission denied
> du: cannot read directory './garage/.gnupg': Permission denied
> du: cannot read directory './garage/tmp': Permission denied
> 76K     ./garage
> du: cannot read directory './tester/.dbus': Permission denied
> du: cannot read directory './tester/.local': Permission denied
> du: cannot read directory './tester/.cache/chromium': Permission denied
> du: cannot read directory './tester/.cache/dconf': Permission denied
> du: cannot read directory './tester/.cache/gvfs': Permission denied
> du: cannot read directory './tester/.cache/mozilla': Permission denied
> du: cannot read directory './tester/.cache/doc': Permission denied
> du: cannot read directory './tester/.pki': Permission denied
> du: cannot read directory './tester/.gnupg': Permission denied
> du: cannot read directory './tester/.config/chromium': Permission denied
> du: cannot read directory './tester/.config/ibus': Permission denied
> du: cannot read directory './tester/.config/pulse': Permission denied
> du: cannot read directory './tester/.config/dconf': Permission denied
> du: cannot read directory './tester/tmp': Permission denied
> du: cannot read directory './tester/.mozilla/firefox': Permission denied
> 2.8G    ./tester
> 8.8G    .
> [dave@x3 home]$ du -d 1 2>/dev/null
> 6.0G    ./dave
> 4.0K    ./rpms
> 76K     ./garage
> 2.8G    ./tester
> 8.8G    .
> [dave@x3 home]$
>
> The error messages from the du command go to STDERR, not STDOUT. The sed
> command
> is only seeing the non-error output.
>
> With "du -d 1 2>/dev/null" the good output still goes to STDOUT, but the
> error
> messages are suppressed by redirecting them to the null output device.
>
> Regards, Dave Hodgins
>
Ahhhh! Of course.
Thanks
--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.98-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64

Re: Misunderstanding sed command

<ak5qij-4d6.ln1@skutter.czi.org.uk>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6624&group=alt.os.linux.mageia#6624

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: woodm@blueyonder.co.uk (Michael Wood)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Tue, 9 May 2023 16:31:54 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <ak5qij-4d6.ln1@skutter.czi.org.uk>
References: <u3dkob$9jlo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="0c339eb98fe780a622a3d48216841651";
logging-data="339715"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eUePWEPCbw+Al0/fTUbzk"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.10.0
Cancel-Lock: sha1:Ldn9wnF7OvftW2Dn+DdyRGvhbh4=
Content-Language: en-GB
In-Reply-To: <u3dkob$9jlo$1@dont-email.me>
 by: Michael Wood - Tue, 9 May 2023 15:31 UTC

sed is acting on stdout, but the errors get written to stderr. You can
re-direct stderr to stdout, to get the sed to work using:
du -d 1 2>&1 | sed '/du:/d'

On 09/05/2023 15:18, Grimble wrote:
> Using du -d 1 to get some directory sizes, I also get many
> du: cannot access.../read... messages
> I thought to suppress them by piping them to sed
> du -d 1 | sed '/du:/d'
> but doesn't work. Am I misunderstanding the sed command?

Re: Misunderstanding sed command

<u3dtcc$alla$1@dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6625&group=alt.os.linux.mageia#6625

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: unruh@invalid.ca (William Unruh)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Tue, 9 May 2023 16:46:05 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <u3dtcc$alla$1@dont-email.me>
References: <u3dkob$9jlo$1@dont-email.me>
Injection-Date: Tue, 9 May 2023 16:46:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="88be943391ef88cb9fbf8d758753599f";
logging-data="349866"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mhSlujWlH1CH0Zmf4yyx9"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ajGJGfmq6Ap4XU6DcmjPzNt795Q=
 by: William Unruh - Tue, 9 May 2023 16:46 UTC

On 2023-05-09, Grimble <grimble@nomail.afraid.org> wrote:
> Using du -d 1 to get some directory sizes, I also get many
> du: cannot access.../read... messages

log on as root and try again. They are probably permission problems. If
not, they your disk is probably terminally failing.

> I thought to suppress them by piping them to sed
> du -d 1 | sed '/du:/d'

Those error messages come out on stderr rather than stdout. Only the
latter is piped to sed so sed never sees the error messages.
If you wnat to get rid of them
du -d 1 2>/dev/null
which sends stderr ( output track 2) to dev/null.

> but doesn't work. Am I misunderstanding the sed command?

No You are misunderstanding stderr and stdout.

Re: Misunderstanding sed command

<u3hf0b$rnre$1@redfloyd.dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6626&group=alt.os.linux.mageia#6626

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam.here@its.invalid (red floyd)
Newsgroups: alt.os.linux.mageia
Subject: Re: Misunderstanding sed command
Date: Wed, 10 May 2023 18:05:15 -0700
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <u3hf0b$rnre$1@redfloyd.dont-email.me>
References: <u3dkob$9jlo$1@dont-email.me> <ak5qij-4d6.ln1@skutter.czi.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 May 2023 01:05:15 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="8775489b9d34aa7c27488fb3179b4d84";
logging-data="909166"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yj1yd7llXEpCz7hLI4epQcOyd+VwP8Bw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:7oT3iTwdZtD070AekoM66+Ggza0=
Content-Language: en-US
In-Reply-To: <ak5qij-4d6.ln1@skutter.czi.org.uk>
 by: red floyd - Thu, 11 May 2023 01:05 UTC

On 5/9/2023 8:31 AM, Michael Wood wrote:
> sed is acting on stdout, but the errors get written to stderr.  You can
> re-direct stderr to stdout, to get the sed to work using:
> du -d 1 2>&1 | sed '/du:/d'
>

OP doesn't want the stderr. So the previously discussed

du -d 1 2> /dev/null | sed '/du:/d'

is the proper answer here.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor