How to rewrite this sed command to awk?

I have a script: #!/bin/bash SOL_atom_index=116101 number=1 SOL_mol_index=SOL$number index=1 for index in {1..100} do for SOL_index in {116101..136845} do sed -i “s/$SOL_atom_index/$SOL_mol_index/g;s/$(($SOL_atom_index+1))/$SOL_mol_index/g;s/$(($SOL_atom_index+2))/$SOL_mol_index/g” eq2_12_333_new_$index.ndx SOL_atom_index=$(($SOL_atom_index+3)) number=$(($number+1)) SOL_mol_index=SOL$number done done Is it possible to rewrite this part of code to awk? for SOL_index in {116101..136845} do sed -i “s/$SOL_atom_index/$SOL_mol_index/g;s/$(($SOL_atom_index+1))/$SOL_mol_index/g;s/$(($SOL_atom_index+2))/$SOL_mol_index/g” eq2_12_333_new_$index.ndx SOL_atom_index=$(($SOL_atom_index+3)) number=$(($number+1)) SOL_mol_index=SOL$number done I ask, because…

Details

Flutter Hive: How to write custom class object in hive object?

While using hive in flutter I used my custom class object Profile profile in hive object. So, initially, I set the custom class object(Profile profile) as null while adding in Hive box. Following is my Hive class: import ‘dart:convert’; import ‘package:hive/hive.dart’; import ‘package:lpa_exam/src/model/listofexams.dart’; import ‘package:lpa_exam/src/model/profile.dart’; part ‘hiveprofile.g.dart’; @HiveType() class PersonModel extends HiveObject{ @HiveField(0) String language;…

Details

Cannot connect Mongodb in Ubuntu 18

I installed mongodb following all the documentation steps: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ the /var/lib/mongodbdirectory was not created. When i type mongo on terminal this is shown: $ mongo MongoDB shell version v4.2.2 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb 2020-01-13T09:33:12.125-0300 E QUERY [js] Error: couldn’t connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection…

Details

SQL Server database delete duplicates trend values, but leave first and last

I have large database full of temperature values. Problem is that system saves lot of duplicate values, and now the SQL Server database is full (Express edition). Part of sample of data, using query SELECT [PointID], [Time], [Data] FROM TrendSamples WHERE pointid = 13 ORDER BY time DESC Result: PointID Time Data ——————————————— 13 2020-01-02…

Details

require(“http2”) in angular 7

I want to use http2 for client side in my angular project. const http2 = require(“http2”); const client = http2.connect(“http://localhost:8443”); const req = client.request({ “:path”: “/” }); When I wrote this code block for http2 request, I get error Module not found: Error: Can’t resolve ‘http2’ in ‘/path’ . There was http2 package (“npm install…

Details