lbrt...@gmail.com wrote:
>On 2/21/23, Greg Wooledge wrote:
>> I have a funny feeling Albretch might be using Microsoft file systems
>> (FAT, NTFS) for a large chunk of his system. Those have a much larger
>> set of restricted characters.
>
> Certainly not FAT32 and definitely not FAT, but at work
On 2/21/23, Greg Wooledge wrote:
> I have a funny feeling Albretch might be using Microsoft file systems
> (FAT, NTFS) for a large chunk of his system. Those have a much larger
> set of restricted characters.
Certainly not FAT32 and definitely not FAT, but at work (I work as a
Math teacher and
On Tue, Feb 21, 2023 at 05:19:13AM +, Tim Woodall wrote:
> On Mon, 20 Feb 2023, Albretch Mueller wrote:
>
> > On 2/15/23, Greg Wooledge wrote:
> >
> > The reason why I use pipes as field delimiter is because it is an
> > excellent meta character when you are working with filesystems. Pipes
>
On Mon, 20 Feb 2023, Albretch Mueller wrote:
On 2/15/23, Greg Wooledge wrote:
The reason why I use pipes as field delimiter is because it is an
excellent meta character when you are working with filesystems. Pipes
would not accepted for files or directory names for good reasons,
anyway.
tim
On Mon, Feb 20, 2023 at 09:12:08PM +, Albretch Mueller wrote:
> However this would rightly split that line based on the pipe delimiter:
>
> $ echo "${_PTH}" | awk -F '|' '{for (i=1; i<=NF; i++) print $i;}'
> 83847547
> 2
> dli.ernet.449320/449320-Seduction Of The Innocent_text.pdf
So you're
Thank you! I noticed my mistake and yes, once again it was a hack
which I thought to be a typo. I had removed the pipe you had included
in the last part of the input string!: "${_PTH}|"
_PTH="83847547|2|dli.ernet.449320/449320-Seduction Of The Innocent_text.pdf"
IFS="|" read -ra _PTH_AR <<< "${_P
On Mon, Feb 20, 2023 at 07:24:01PM +, Albretch Mueller wrote:
> > https://mywiki.wooledge.org/BashPitfalls#pf47
> >
> what I am trying to do is split a string using as delimiter a pipe
The web page you cited tells you how, doesn't it? Assuming your string
is a line (e.g. something you pulled
> https://mywiki.wooledge.org/BashPitfalls#pf47
>
what I am trying to do is split a string using as delimiter a pipe. I
used to do that with awk, but it doesn't work anymore after someone
had the great idea of substituting awk with mawk, it seems; and Hey!
They could have done it with python!:
$
On Mon, Feb 20, 2023 at 07:10:11AM +, Albretch Mueller wrote:
> On 2/15/23, Greg Wooledge wrote:
> > If you want to read FIELDS of a SINGLE LINE as array elements, use
> > read -ra:
> >
> > read -ra myarray <<< "$one_line"
>
> It didn't work. I tried different options. I am getting: "bash: r
On 2/15/23, Greg Wooledge wrote:
> If you want to read FIELDS of a SINGLE LINE as array elements, use
> read -ra:
>
> read -ra myarray <<< "$one_line"
It didn't work. I tried different options. I am getting: "bash: read:
... : not a valid identifier"
_PTH="83847547|2|dli.ernet.449320/449320-Se
On Wed, Feb 15, 2023 at 12:09:28PM +, Albretch Mueller wrote:
> On 2/15/23, DdB wrote:
> > $ echo "Adams, Fred, and Ken Aizawa \"The Bounds of Cognition\"" | awk
> > -F'\"' '{for (i=1; i<=NF; i++) print $i;}'
> > Adams, Fred, and Ken Aizawa
> > The Bounds of Cognition
>
> yes and this also w
On 2/15/23, DdB wrote:
> $ echo "Adams, Fred, and Ken Aizawa \"The Bounds of Cognition\"" | awk
> -F'\"' '{for (i=1; i<=NF; i++) print $i;}'
> Adams, Fred, and Ken Aizawa
> The Bounds of Cognition
yes and this also works:
_L="Adams, Fred, and Ken Aizawa \"The Bounds of Cognition\""
echo "${_L}"
On Wed, 15 Feb 2023 at 18:22, DdB
wrote:
> Am 15.02.2023 um 07:25 schrieb Albretch Mueller:
> > $ _L="Adams, Fred, and Ken Aizawa \"The Bounds of Cognition\""
> > echo "// __ \$_L: |${_L}|"
> > _AR=($(echo "${_L}" | awk -F'\"' '{for (i=1; i<=NF; i++) print $i}' ))
> > _AR_L=${#_AR[@]}
> > echo "/
Am 15.02.2023 um 08:21 schrieb DdB:
> $ awk --version
> GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.1.2)
> Copyright © 1989, 1991-2018 Free Software Foundation.
even mawk would. see:
$ mawk -W version
compiled limits:
max NF 32767
sprintf buffer 2040
$ echo "Adams, Fred, a
Am 15.02.2023 um 07:25 schrieb Albretch Mueller:
> $ _L="Adams, Fred, and Ken Aizawa \"The Bounds of Cognition\""
> echo "// __ \$_L: |${_L}|"
> _AR=($(echo "${_L}" | awk -F'\"' '{for (i=1; i<=NF; i++) print $i}' ))
> _AR_L=${#_AR[@]}
> echo "// __ \$_AR_L: |${_AR_L}|"
> for(( _IX=0; _IX<${_AR_L};
Once again one of my silly problems ;-). I search and search for an
answer/the reason why this is happening.
$ _L="Adams, Fred, and Ken Aizawa \"The Bounds of Cognition\""
echo "// __ \$_L: |${_L}|"
_AR=($(echo "${_L}" | awk -F'\"' '{for (i=1; i<=NF; i++) print $i}' ))
_AR_L=${#_AR[@]}
echo "// _
16 matches
Mail list logo