On Thu, Apr 18, 2019 at 09:16:55AM +1000, Cameron Simpson wrote:
> On 17Apr2019 22:45, felixs wrote:
> > Thanks for your detailed comments and explanations. It will need a
> > second lecture with the Bash Reference Manual opened in another terminal
> > to fully understand the differences.
>
> Or,
Hi Derek,
> ls -1 /path/to/spool | while read file; do
> outfile_name = "${file}.out"
> #You can use -e but you don't need it, no difference
> sed -n '/^From: $EMAIL_ADDRESS/p ; /Subject: $SUBJECT/p' \
> "$file" > $outfile_name
> done
I can confirm that this script
On 17Apr2019 22:45, felixs wrote:
Thanks for your detailed comments and explanations. It will need a
second lecture with the Bash Reference Manual opened in another terminal
to fully understand the differences.
Or, as previously mentioned: just "man sh", not "man bash".
_Everything_ we've dis
Thanks for your detailed comments and explanations. It will need a
second lecture with the Bash Reference Manual opened in another terminal
to fully understand the differences.
felixs
On Wed, Apr 17, 2019 at 08:28:56AM +1000, Cameron Simpson wrote:
> On 16Apr2019 18:40, felixs wrote:
> > On Tue,
On 16Apr2019 18:40, felixs wrote:
On Tue, Apr 16, 2019 at 09:52:57AM +1000, Cameron Simpson wrote:
Globbing is used to construct command line arguments. But a
redirection is
not a command line parameter - it is only subject to parameter substitution
- $blah.
Ok, got it. Globbing = filename e
On Tue, Apr 16, 2019 at 09:52:57AM +1000, Cameron Simpson wrote:
> On 15Apr2019 11:23, felixs wrote:
> > Thanks, Cameron. Some coments go in between your comments.
>
> As they should :-)
>
> > > If you go:
> > >
> > > sed ... > >
> > > and that does not match a _single_ file, then the shell
On 15Apr2019 17:39, felixs wrote:
Ok, understood to the extent applicable to me.
I decided to forward this sent message because I wanted to add the
comment to the message to which the comment referred to. But I
understand the criticism about thread-breaking messages.
Yeah. The simplest thing i
On 15Apr2019 11:23, felixs wrote:
Thanks, Cameron. Some coments go in between your comments.
As they should :-)
If you go:
sed ...
Well, I simply tried to use the catch-all parameter, which cannot be used
in this case. But it is accepted when having no redirection.
These are 2 differen
Thanks, Derek.
On Mon, Apr 15, 2019 at 12:02:18PM -0500, Derek Martin wrote:
> On Sun, Apr 14, 2019 at 08:06:04PM +0200, felixs wrote:
> > I searched in the documentation of sed (info sed), the bash-hacker's
> > wiki (1) and read through the Advanced Bash Scripting Guide, but I
> > haven't found
On Sun, Apr 14, 2019 at 08:06:04PM +0200, felixs wrote:
> I searched in the documentation of sed (info sed), the bash-hacker's
> wiki (1) and read through the Advanced Bash Scripting Guide, but I
> haven't found the exact use case of redirecting input to all the files
> of a directory.
FWIW, you
On Mon, Apr 15, 2019 at 01:13:05PM +0200, Francesco Ariis wrote:
> On Mon, Apr 15, 2019 at 11:33:45AM +0200, felixs wrote:
> > Please see UPDATE section
> > [...]
>
> Hello everyone,
> the `In-Reply-To` header for this discussion keeps getting mangled,
> which confuses mutt and other programs
On Mon, Apr 15, 2019 at 11:33:45AM +0200, felixs wrote:
> Please see UPDATE section
> [...]
Hello everyone,
the `In-Reply-To` header for this discussion keeps getting mangled,
which confuses mutt and other programs (check the broken thread [1])
to no end. :P
Most likely the problem is not usin
Please see UPDATE section
- Forwarded message from felixs -
Date: Mon, 15 Apr 2019 11:23:29 +0200
From: felixs
To: mutt-users@mutt.org
Subject: Re: [Fwd: Re: Send to a Listing]
Thanks, Cameron. Some coments go in between your comments.
On Mon, Apr 15, 2019 at 05:15:37PM +1000
Thanks, Cameron. Some coments go in between your comments.
On Mon, Apr 15, 2019 at 05:15:37PM +1000, Cameron Simpson wrote:
> On 15Apr2019 08:52, felixs wrote:
> > > However, sed can instead accept a list of files on the command line
>
> Which felixs has tested successfully...
>
> > > and
> > >
On Mon, Apr 15, 2019 at 05:10:14PM +1000, Cameron Simpson wrote:
> On 15Apr2019 08:34, felixs wrote:
> > On Mon, Apr 15, 2019 at 07:33:53AM +1000, Cameron Simpson wrote:
> > > On 15Apr2019 07:19, Cameron Simpson wrote:
> > > > Think about it. You're invoking sed _once_. Its input can come from on
On 15Apr2019 08:52, felixs wrote:
However, sed can instead accept a list of files on the command line
Which felixs has tested successfully...
and
it will then read from each in turn, so instead of having the shell
redirect stdin, just put the wildcard path as the trailing argument on
the com
On 15Apr2019 08:34, felixs wrote:
On Mon, Apr 15, 2019 at 07:33:53AM +1000, Cameron Simpson wrote:
On 15Apr2019 07:19, Cameron Simpson wrote:
> Think about it. You're invoking sed _once_. Its input can come from only
> one file.
Actually, I lie. The way you're doing it "sed
I can confirm th
Thanks, Nathan. I can confirm that. Not redirecting standard input to a file
but putting path/to/spoolfile as last argumnent works, as indicated in
the other message I sent to the list. I checked it on the command line.
On Sun, Apr 14, 2019 at 05:38:31PM -0400, Nathan Stratton Treadway wrote:
> On
On Mon, Apr 15, 2019 at 07:33:53AM +1000, Cameron Simpson wrote:
> On 15Apr2019 07:19, Cameron Simpson wrote:
> > Think about it. You're invoking sed _once_. Its input can come from only
> > one file.
>
> Actually, I lie. The way you're doing it "sed file. Sed will work on many files, like almos
I have placed my comments among yours, I hope you don't mind.
On Mon, Apr 15, 2019 at 07:19:14AM +1000, Cameron Simpson wrote:
> On 14Apr2019 20:06, felixs wrote:
> > fiddling with sed in the mutt mailing bash script
>
> Nothing you're doing requires bash. Just use /bin/sh - "the shell" - it is
On 14Apr2019 17:38, Nathan Stratton Treadway wrote:
(The applicable paragraph from the [GNU] sed man page is:
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are n
On Sun, Apr 14, 2019 at 20:06:04 +0200, felixs wrote:
> sed -ne '/^From: $EMAIL_ADDRESS/p ; /Subject: $SUBJECT/p' \
> < /path/to/spoolfile
>
> If I specify a message file on the command line it works. If I try to
> make sed take its input from ALL the files in the directory using the
> above synta
On 15Apr2019 07:19, Cameron Simpson wrote:
Think about it. You're invoking sed _once_. Its input can come from
only one file.
Actually, I lie. The way you're doing it "sed one file. Sed will work on many files, like almost any UNIX utility:
sed /path/to/spooldir/*
(And that _is_ in "m
On 14Apr2019 20:06, felixs wrote:
fiddling with sed in the mutt mailing bash script
Nothing you're doing requires bash. Just use /bin/sh - "the shell" - it
is portable; it _is_ bash on many linux systems (though by no means
all), and it is _always_ present on any POSIX system. You're writing
Hi mutt users,
fiddling with sed in the mutt mailing bash script I am writing I do not find
a way to make sed read all files of a directory from standard in?
I redirected standard input to a file and try to 'point' sed to all the
files of the directory which is the spoolfile (maildir), like so:
25 matches
Mail list logo