Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and appears to be fixed. Will keep monitoring.


computers / alt.os.linux.mint / script problem if you want to tackle it.

SubjectAuthor
* script problem if you want to tackle it.Big Al
+* Re: script problem if you want to tackle it.Big Al
|`- Re: script problem if you want to tackle it.jeorge
+* Re: script problem if you want to tackle it.Chris Elvidge
|`- Re: script problem if you want to tackle it. [WORKING]Big Al
`* Re: script problem if you want to tackle it.Paul
 `- Re: script problem if you want to tackle it. [ RESOLVED ]Big Al

1
script problem if you want to tackle it.

<ublj6u$3rhlu$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6665&group=alt.os.linux.mint#6665

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bea...@invalid.com (Big Al)
Newsgroups: alt.os.linux.mint
Subject: script problem if you want to tackle it.
Date: Thu, 17 Aug 2023 12:51:40 -0400
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <ublj6u$3rhlu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Aug 2023 16:51:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9056b4cc224c5c6fb091456e4b985bda";
logging-data="4048574"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0fH6NgKylcvIweJi4eFZ7MWUqLhAouSg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:jJZMMCscPKAHRSLlx+zbbu6fXhE=
Content-Language: en-US
 by: Big Al - Thu, 17 Aug 2023 16:51 UTC

I'm chasing my tail I think.
I'm trying to automate in a bash shell the process of incrementing a version # by one digit. 2.23 to 2.24

I've got the following script. It may be the long way around but I've been piecing this step by step trying to get the
syntax right on each line. So it's broken down that way. It's the last line that is giving me the issue.

OLDver=$(expr $(grep '"version"' manifest.json | awk -F\" '{ print $4 }')) # grab the version with dot
leftOLD=${OLDver:0:1}
rightOLD=${OLDver:2:4} #split the digits out for sed command
INCR=0.01
NEWver=$(echo $OLDver + $INCR | bc) # Increment the version number number to 2.24
leftNEW=${NEWver:0:1}
rightNEW=${NEWver:2:4} #split the digits again
# all this because sed will not substitute with periods unless escaped.
# so I've split the digits out
# but this last line does not work.
sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json

I've run this by clicking the shell script. I've run the shell script from a terminal. No errors anywhere.
I can paste these lines into terminal and run them, it doesn't work, but I can echo the last line:
echo "sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json"
and I get: sed -i 's/2\.23/2\.24/' manifest.json
which is what I want.
If I write out the sed
sed -i 's/2\.23/2\.24/' manifest.json
it works. Just not in the bash script.

Anyone got an idea? Some idiosyncrasy of Bash?

--
Linux Mint 21.1 Cinnamon 5.6.8
Al

Re: script problem if you want to tackle it.

<ublmv4$3s2di$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6669&group=alt.os.linux.mint#6669

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bea...@invalid.com (Big Al)
Newsgroups: alt.os.linux.mint
Subject: Re: script problem if you want to tackle it.
Date: Thu, 17 Aug 2023 13:55:48 -0400
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <ublmv4$3s2di$2@dont-email.me>
References: <ublj6u$3rhlu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 17 Aug 2023 17:55:48 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a53d7fbf7d8f403597312cc505ef9a48";
logging-data="4065714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oSLV3d86+xBtJP7AVL3Sugyy6JkfF0b8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:sFCJTv/S7j5zwj75OIowb5F4FGY=
Content-Language: en-US
In-Reply-To: <ublj6u$3rhlu$1@dont-email.me>
 by: Big Al - Thu, 17 Aug 2023 17:55 UTC

On 8/17/23 12:51, this is what Big Al wrote:
> I'm chasing my tail I think.
> I'm trying to automate in a bash shell the process of incrementing a version # by one digit. 2.23 to 2.24
>
> I've got the following script.   It may be the long way around but I've been piecing this step by step trying to get the
> syntax right on each line.  So it's broken down that way.   It's the last line that is giving me the issue.
>
> OLDver=$(expr $(grep '"version"' manifest.json | awk -F\" '{ print $4 }'))  # grab the version with dot
> leftOLD=${OLDver:0:1}
> rightOLD=${OLDver:2:4}  #split the digits out for sed command
> INCR=0.01
> NEWver=$(echo $OLDver + $INCR | bc) # Increment the version number number to 2.24
> leftNEW=${NEWver:0:1}
> rightNEW=${NEWver:2:4}  #split the digits again
>     # all this because sed will not substitute with periods unless escaped.
>     # so I've split the digits out
>     # but this last line does not work.
> sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json
>
>
> I've run this by clicking the shell script.  I've run the shell script from a terminal.  No errors anywhere.
> I can paste these lines into terminal and run them, it doesn't work, but I can echo the last line:
>     echo "sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json"
> and I get:     sed -i 's/2\.23/2\.24/' manifest.json
> which is what I want.
> If I write out the sed
>     sed -i 's/2\.23/2\.24/' manifest.json
> it works.  Just not in the bash script.
>
> Anyone got an idea?  Some idiosyncrasy of Bash?
>
Not part of the problem, but the first line has an excess 'expr' command that does nothing but complicate the code.
OLDver=$(grep '"version"' manifest.json | awk -F\" '{ print $4 }')
--
Linux Mint 21.1 Cinnamon 5.6.8
Al

Re: script problem if you want to tackle it.

<ublpnu$1nm5$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6671&group=alt.os.linux.mint#6671

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: some...@invalid.invalid (jeorge)
Newsgroups: alt.os.linux.mint
Subject: Re: script problem if you want to tackle it.
Date: Thu, 17 Aug 2023 12:43:10 -0600
Organization: Ministry of Madness
Message-ID: <ublpnu$1nm5$1@nnrp.usenet.blueworldhosting.com>
References: <ublj6u$3rhlu$1@dont-email.me> <ublmv4$3s2di$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 17 Aug 2023 18:43:10 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="YKRG+wcUE3ZH5QknWLsQFQjWpafUZ9Hi6Jg7DGavMDA";
logging-data="57029"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:vAfdQaSvwpip+y+jtSwSHTsXZd4= sha256:ta7R5Xb3Gfaa/VG2ZkAkMOLKXIhzccPm2wpT8pu9SZM=
sha1:PZed1tIKIYj/AjIQziA9277g5GQ= sha256:Tf+RYHkhYIRI5Ogkg9DIr4+FayNCCKYQCqpK6sAdBkE=
Content-Language: en-US
In-Reply-To: <ublmv4$3s2di$2@dont-email.me>
 by: jeorge - Thu, 17 Aug 2023 18:43 UTC

On 8/17/23 11:55 AM, Big Al wrote:
> I've run this by clicking the shell script.  I've run the shell script
> from a terminal.  No errors anywhere.

Assuming you're doing this within the file manager (FM) it's probably
the FM settings; if you right-click on the script and select 'Properties
>> Permissions' you can check what the permissions are. I think you
need to have

'Execute: [x] Allow executing file as program'

enabled for launching scripts from the FM. Once enabled when you
double-click on the script you should get prompted for what to do; click
'Run in terminal' or 'Run'. Note that if you choose the former and your
script doesn't have a "pause" built into it the terminal will
immediately close once the program completes. You can add a pause using
the built-in function 'read':

$ cat foo.sh
#!/bin/bash
oldVER='2.23'
newVER="$(echo $oldVER |sed 's/2\.23/2\.24/')"
echo "oldVER = $oldVER"
echo "newVER = $newVER"
read -n1 -r -p'press any key to continue..'

$ . ./foo.sh
oldVER = 2.23
newVER = 2.24
press any key to continue..

This seems to work both in the terminal and launched from the Nemo FM.
If you're writing the results to some file then you don't need a pause
and can just choose 'Run'.

Re: script problem if you want to tackle it.

<ubls8d$3svb8$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6674&group=alt.os.linux.mint#6674

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux.mint
Subject: Re: script problem if you want to tackle it.
Date: Thu, 17 Aug 2023 20:26:04 +0100
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <ubls8d$3svb8$1@dont-email.me>
References: <ublj6u$3rhlu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Aug 2023 19:26:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7971fa7d22086e2cf99c35673fc1e528";
logging-data="4095336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MUe7xhcT5lsojRkuCB35JbemU/vmRUrI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:3Yqx87742ahP+CwkxroENpz7ziU=
Content-Language: en-GB
In-Reply-To: <ublj6u$3rhlu$1@dont-email.me>
 by: Chris Elvidge - Thu, 17 Aug 2023 19:26 UTC

On 17/08/2023 17:51, Big Al wrote:
> I'm chasing my tail I think.
> I'm trying to automate in a bash shell the process of incrementing a
> version # by one digit. 2.23 to 2.24
>
> I've got the following script. It may be the long way around but I've
> been piecing this step by step trying to get the syntax right on each
> line. So it's broken down that way. It's the last line that is giving
> me the issue.
>
> OLDver=$(expr $(grep '"version"' manifest.json | awk -F\" '{ print $4
> }')) # grab the version with dot
> leftOLD=${OLDver:0:1}
> rightOLD=${OLDver:2:4} #split the digits out for sed command
> INCR=0.01
> NEWver=$(echo $OLDver + $INCR | bc) # Increment the version number
> number to 2.24
> leftNEW=${NEWver:0:1}
> rightNEW=${NEWver:2:4} #split the digits again
> # all this because sed will not substitute with periods unless
> escaped.
> # so I've split the digits out
> # but this last line does not work.
> sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json
>

change the 's in the above line to "s
single quotes stop the expansion of variables

>
> I've run this by clicking the shell script. I've run the shell script
> from a terminal. No errors anywhere.
> I can paste these lines into terminal and run them, it doesn't work, but
> I can echo the last line:
> echo "sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/'
> manifest.json"
> and I get: sed -i 's/2\.23/2\.24/' manifest.json
> which is what I want.
> If I write out the sed
> sed -i 's/2\.23/2\.24/' manifest.json
> it works. Just not in the bash script.
>
> Anyone got an idea? Some idiosyncrasy of Bash?
>

--

Chris Elvidge, England
COFFEE IS NOT FOR KIDS

Re: script problem if you want to tackle it.

<ublsna$3t1bm$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6676&group=alt.os.linux.mint#6676

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: alt.os.linux.mint
Subject: Re: script problem if you want to tackle it.
Date: Thu, 17 Aug 2023 15:34:00 -0400
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ublsna$3t1bm$1@dont-email.me>
References: <ublj6u$3rhlu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 17 Aug 2023 19:34:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bd303beeef5f21ece300be60ce8291ea";
logging-data="4097398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jIwiMG8/HegHjnlJB04iNd9ngdxd0w+Q="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:wFHIodzaAEnt9n6P7ISxLnoC0OE=
In-Reply-To: <ublj6u$3rhlu$1@dont-email.me>
Content-Language: en-US
 by: Paul - Thu, 17 Aug 2023 19:34 UTC

On 8/17/2023 12:51 PM, Big Al wrote:
> I'm chasing my tail I think.
> I'm trying to automate in a bash shell the process of incrementing a version # by one digit. 2.23 to 2.24
>
> I've got the following script.   It may be the long way around but I've been piecing this step by step trying to get the syntax right on each line.  So it's broken down that way.   It's the last line that is giving me the issue.
>
> OLDver=$(expr $(grep '"version"' manifest.json | awk -F\" '{ print $4 }'))  # grab the version with dot
> leftOLD=${OLDver:0:1}
> rightOLD=${OLDver:2:4}  #split the digits out for sed command
> INCR=0.01
> NEWver=$(echo $OLDver + $INCR | bc) # Increment the version number number to 2.24
> leftNEW=${NEWver:0:1}
> rightNEW=${NEWver:2:4}  #split the digits again
>     # all this because sed will not substitute with periods unless escaped.
>     # so I've split the digits out
>     # but this last line does not work.
> sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json
>
>
> I've run this by clicking the shell script.  I've run the shell script from a terminal.  No errors anywhere.
> I can paste these lines into terminal and run them, it doesn't work, but I can echo the last line:
>     echo "sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json"
> and I get:     sed -i 's/2\.23/2\.24/' manifest.json
> which is what I want.
> If I write out the sed
>     sed -i 's/2\.23/2\.24/' manifest.json
> it works.  Just not in the bash script.
>
> Anyone got an idea?  Some idiosyncrasy of Bash?
>

All I could find, is this for inspiration. I don't
know how complex your problem really is (what cruft is in
the file to prevent a solution from working).

https://stackoverflow.com/questions/36402167/update-version-number-stored-in-json-file

Paul

Re: script problem if you want to tackle it. [WORKING]

<ubm5fo$3u7p1$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6677&group=alt.os.linux.mint#6677

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bea...@invalid.com (Big Al)
Newsgroups: alt.os.linux.mint
Subject: Re: script problem if you want to tackle it. [WORKING]
Date: Thu, 17 Aug 2023 18:03:33 -0400
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <ubm5fo$3u7p1$1@dont-email.me>
References: <ublj6u$3rhlu$1@dont-email.me> <ubls8d$3svb8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 17 Aug 2023 22:03:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e97585f105e95b4e442701f954d694e2";
logging-data="4136737"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JWMhwiT3ZNgANXUhUCNS8WiAjwhLuP4Q="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:W3g20I9kU6mYIxI0uoAbLuTW5cw=
In-Reply-To: <ubls8d$3svb8$1@dont-email.me>
Content-Language: en-US
 by: Big Al - Thu, 17 Aug 2023 22:03 UTC

On 8/17/23 15:26, this is what Chris Elvidge wrote:
> On 17/08/2023 17:51, Big Al wrote:
>> I'm chasing my tail I think.
>> I'm trying to automate in a bash shell the process of incrementing a version # by one digit. 2.23 to 2.24
>>
>> I've got the following script.   It may be the long way around but I've been piecing this step by step trying to get
>> the syntax right on each line.  So it's broken down that way.   It's the last line that is giving me the issue.
>>
>> OLDver=$(expr $(grep '"version"' manifest.json | awk -F\" '{ print $4 }'))  # grab the version with dot
>> leftOLD=${OLDver:0:1}
>> rightOLD=${OLDver:2:4}  #split the digits out for sed command
>> INCR=0.01
>> NEWver=$(echo $OLDver + $INCR | bc) # Increment the version number number to 2.24
>> leftNEW=${NEWver:0:1}
>> rightNEW=${NEWver:2:4}  #split the digits again
>>      # all this because sed will not substitute with periods unless escaped.
>>      # so I've split the digits out
>>      # but this last line does not work.
>> sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json
>>
>
> change the 's in the above line to "s
> single quotes stop the expansion of variables
>
>>
>> I've run this by clicking the shell script.  I've run the shell script from a terminal.  No errors anywhere.
>> I can paste these lines into terminal and run them, it doesn't work, but I can echo the last line:
>>      echo "sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json"
>> and I get:     sed -i 's/2\.23/2\.24/' manifest.json
>> which is what I want.
>> If I write out the sed
>>      sed -i 's/2\.23/2\.24/' manifest.json
>> it works.  Just not in the bash script.
>>
>> Anyone got an idea?  Some idiosyncrasy of Bash?
>>
>
>
You are the man!!! I knew there was some little item I was overlooking!
I knew it was possible, hell there isn't much linux can't do even in the lowly bash!
Thanks much.
--
Linux Mint 21.1 Cinnamon 5.6.8
Al

Re: script problem if you want to tackle it. [ RESOLVED ]

<ubm7ae$3ufg7$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6678&group=alt.os.linux.mint#6678

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bea...@invalid.com (Big Al)
Newsgroups: alt.os.linux.mint
Subject: Re: script problem if you want to tackle it. [ RESOLVED ]
Date: Thu, 17 Aug 2023 18:34:52 -0400
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <ubm7ae$3ufg7$1@dont-email.me>
References: <ublj6u$3rhlu$1@dont-email.me> <ublsna$3t1bm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 17 Aug 2023 22:34:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e97585f105e95b4e442701f954d694e2";
logging-data="4144647"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19SRVIqelNJrf2OCFSAmfOqcFgjy97ODlM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:lttJcvnEno0Z6fUxKQu2V+lBJKE=
In-Reply-To: <ublsna$3t1bm$1@dont-email.me>
Content-Language: en-US
 by: Big Al - Thu, 17 Aug 2023 22:34 UTC

On 8/17/23 15:34, this is what Paul wrote:
> On 8/17/2023 12:51 PM, Big Al wrote:
>> I'm chasing my tail I think.
>> I'm trying to automate in a bash shell the process of incrementing a version # by one digit. 2.23 to 2.24
>>
>> I've got the following script.   It may be the long way around but I've been piecing this step by step trying to get the syntax right on each line.  So it's broken down that way.   It's the last line that is giving me the issue.
>>
>> OLDver=$(expr $(grep '"version"' manifest.json | awk -F\" '{ print $4 }'))  # grab the version with dot
>> leftOLD=${OLDver:0:1}
>> rightOLD=${OLDver:2:4}  #split the digits out for sed command
>> INCR=0.01
>> NEWver=$(echo $OLDver + $INCR | bc) # Increment the version number number to 2.24
>> leftNEW=${NEWver:0:1}
>> rightNEW=${NEWver:2:4}  #split the digits again
>>     # all this because sed will not substitute with periods unless escaped.
>>     # so I've split the digits out
>>     # but this last line does not work.
>> sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json
>>
>>
>> I've run this by clicking the shell script.  I've run the shell script from a terminal.  No errors anywhere.
>> I can paste these lines into terminal and run them, it doesn't work, but I can echo the last line:
>>     echo "sed -i 's/$leftOLD\.$rightOLD/$leftNEW\.$rightNEW/' manifest.json"
>> and I get:     sed -i 's/2\.23/2\.24/' manifest.json
>> which is what I want.
>> If I write out the sed
>>     sed -i 's/2\.23/2\.24/' manifest.json
>> it works.  Just not in the bash script.
>>
>> Anyone got an idea?  Some idiosyncrasy of Bash?
>>
>
> All I could find, is this for inspiration. I don't
> know how complex your problem really is (what cruft is in
> the file to prevent a solution from working).
>
> https://stackoverflow.com/questions/36402167/update-version-number-stored-in-json-file
>
> Paul
>
It was help by a mile!
That long verbose script of mine is a one liner. A suggestion in the link, modified for my needs.

awk -F'["]' -v OFS='"' '/"version":/{split($4,a,".");$4=a[1]"."a[2]+1};1' manifest.json > manifest2.json

and then a simple mv manifest.json2 manifest.json
--
Linux Mint 21.1 Cinnamon 5.6.8
Al

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor