Thank you very much, Greg!
Since ".description" is constant (an extension used by youtube) I chose to go:
ydx=".description"
ydxL=${#ydx}
...
yut=${yl:-${ydxL}}
...
where yl is the line read in in the way you suggested.
lbrtchx
Hello,
On Mon, Oct 23, 2023 at 01:32:08AM +, Albretch Mueller wrote:
> On 10/22/23, Andy Smith wrote:
> > So you might consider telling us what you will do next with the
> > suffix of each line.
>
> Now you have gone into mind reading mode.
I've gone into "avoid the need for mind reading"
On 23/10/2023 10:56, David wrote:
Hi, for your info, this convention is specified by POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html
Which says:
Environment variable names used by the utilities in the Shell and
Utilities volume of POSIX.1-2017 consist
On Mon, 23 Oct 2023 at 13:25, Eduardo M KALINOWSKI
wrote:
> On 22/10/2023 23:13, Greg Wooledge wrote:
> > 2) All-caps variable name IFL. All-caps variable names are reserved,
> >by convention, for environment variables (e.g. PATH) and special
> >shell variables (e.g. IFS).
> While I
On 22/10/2023 23:13, Greg Wooledge wrote:
2) All-caps variable name IFL. All-caps variable names are reserved, by
convention, for environment variables (e.g. PATH) and special shell
variables (e.g. IFS).
While I don't disagree with the suggestion of using lower case for
variables
On Mon, Oct 23, 2023 at 01:21:43PM +0530, Pankaj Jangid wrote:
> Another way to do it is,
>
> cat "${IFL}"| cut -d "/" -f7-|sed 's/.description//'
>
> because you already know the prefix, you can count the fields. So "-f7-"
> i.e. 7 onwards. Then use sed to remove the extension.
Whoops! I
Albretch Mueller writes:
> After generating a file with lines of text, I have to:
> 1) parse some of those lines based on a pattern I know (no regex
> necessary, just a FS path)
> 2) once parsed from those lines I need the last n characters only
> I am trying to use a one liner like:
> cat
On Sun, Oct 22, 2023 at 10:13:26PM -0400, Greg Wooledge wrote:
[...]
Good points all over -- I envy your clarity.
To drive home Greg's point about naming conventions a bit
more: bash (in general, shells) have very little protection
for mis-naming variables (you don' have to declare them,
they
On Sun, Oct 22, 2023, 10:39 PM Albretch Mueller wrote:
> OK, Greg's suggestion once again "made my day".
> I know at some point I will have to code everything in some
> programming language, but for now I will just get things done as
> quickly as possible.
> Also, Greg, please, I would like
On Mon, Oct 23, 2023 at 01:32:08AM +, Albretch Mueller wrote:
> On 10/22/23, Andy Smith wrote:
> > Most of the points Greg makes to you are matters of correctness, not
> > matters of taste.
>
> that you called "matters of correctness" may be "visual things" to
> other people. this is
On 10/22/23, Andy Smith wrote:
> So you might consider telling us what you will do next with the
> suffix of each line.
Now you have gone into mind reading mode.
On 10/22/23, Andy Smith wrote:
> Most of the points Greg makes to you are matters of correctness, not
> matters of taste.
that
On 10/22/23 17:11, Andy Smith wrote:
Hello,
On Sun, Oct 22, 2023 at 08:50:55PM +, Albretch Mueller wrote:
Greg, please, I would like for you to understand that it is not my
intention to upset you about what you find visually upsetting. We
have talked about that before.
Most of the points
Hello,
On Sun, Oct 22, 2023 at 08:50:55PM +, Albretch Mueller wrote:
> Greg, please, I would like for you to understand that it is not my
> intention to upset you about what you find visually upsetting. We
> have talked about that before.
Most of the points Greg makes to you are matters of
OK, Greg's suggestion once again "made my day".
I know at some point I will have to code everything in some
programming language, but for now I will just get things done as
quickly as possible.
Also, Greg, please, I would like for you to understand that it is not
my intention to upset you about
Hello,
On Sun, Oct 22, 2023 at 04:33:12PM +, Albretch Mueller wrote:
> After generating a file with lines of text, I have to:
> 1) parse some of those lines based on a pattern I know (no regex
> necessary, just a FS path)
> 2) once parsed from those lines I need the last n characters only
On Sun, Oct 22, 2023 at 04:33:12PM +, Albretch Mueller wrote:
> After generating a file with lines of text, I have to:
> 1) parse some of those lines based on a pattern I know (no regex
> necessary, just a FS path)
> 2) once parsed from those lines I need the last n characters only
> I am
On Sun, Oct 22, 2023 at 04:33:12PM +, Albretch Mueller wrote:
> I am trying to use a one liner like:
> cat "${IFL}" | grep "${DESC_DIR}" | tail -c+$_DESC_DIR
> but this one liner repeats the output and the tail
Brevity is not the measure of goodness. When you write a shell script,
it's
On Sun, 22 Oct 2023 16:33:12 +
Albretch Mueller wrote:
> After generating a file with lines of text, I have to:
> 1) parse some of those lines based on a pattern I know (no regex
> necessary, just a FS path)
> 2) once parsed from those lines I need the last n characters only
> I am trying
After generating a file with lines of text, I have to:
1) parse some of those lines based on a pattern I know (no regex
necessary, just a FS path)
2) once parsed from those lines I need the last n characters only
I am trying to use a one liner like:
cat "${IFL}" | grep "${DESC_DIR}" | tail
19 matches
Mail list logo