remove character on the last line that specific word appears

we have the following file example we want to remove the , character on the last line that topic word exists more file {“topic”:”life_is_hard”,”partition”:84,”replicas”:[1006,1003]}, {“topic”:”life_is_hard”,”partition”:85,”replicas”:[1001,1004]}, {“topic”:”life_is_hard”,”partition”:86,”replicas”:[1002,1005]}, {“topic”:”life_is_hard”,”partition”:87,”replicas”:[1003,1006]}, {“topic”:”life_is_hard”,”partition”:88,”replicas”:[1004,1001]}, {“topic”:”life_is_hard”,”partition”:89,”replicas”:[1005,1002]}, {“topic”:”life_is_hard”,”partition”:90,”replicas”:[1006,1004]}, {“topic”:”life_is_hard”,”partition”:91,”replicas”:[1001,1005]}, {“topic”:”life_is_hard”,”partition”:92,”replicas”:[1002,1006]}, {“topic”:”life_is_hard”,”partition”:93,”replicas”:[1003,1001]}, {“topic”:”life_is_hard”,”partition”:94,”replicas”:[1004,1002]}, {“topic”:”life_is_hard”,”partition”:95,”replicas”:[1005,1003]}, {“topic”:”life_is_hard”,”partition”:96,”replicas”:[1006,1005]}, {“topic”:”life_is_hard”,”partition”:97,”replicas”:[1001,1006]}, {“topic”:”life_is_hard”,”partition”:98,”replicas”:[1002,1001]}, {“topic”:”life_is_hard”,”partition”:99,”replicas”:[1003,1002]}, expected output {“topic”:”life_is_hard”,”partition”:84,”replicas”:[1006,1003]}, {“topic”:”life_is_hard”,”partition”:85,”replicas”:[1001,1004]}, {“topic”:”life_is_hard”,”partition”:86,”replicas”:[1002,1005]}, {“topic”:”life_is_hard”,”partition”:87,”replicas”:[1003,1006]}, {“topic”:”life_is_hard”,”partition”:88,”replicas”:[1004,1001]}, {“topic”:”life_is_hard”,”partition”:89,”replicas”:[1005,1002]}, {“topic”:”life_is_hard”,”partition”:90,”replicas”:[1006,1004]}, {“topic”:”life_is_hard”,”partition”:91,”replicas”:[1001,1005]}, {“topic”:”life_is_hard”,”partition”:92,”replicas”:[1002,1006]}, {“topic”:”life_is_hard”,”partition”:93,”replicas”:[1003,1001]}, {“topic”:”life_is_hard”,”partition”:94,”replicas”:[1004,1002]}, {“topic”:”life_is_hard”,”partition”:95,”replicas”:[1005,1003]}, {“topic”:”life_is_hard”,”partition”:96,”replicas”:[1006,1005]}, {“topic”:”life_is_hard”,”partition”:97,”replicas”:[1001,1006]},…

Details

virt-install: send guest command from a host script

I can redirect virt-install input/output to console with the –console option: virt-install \ –name centos \ –ram 1024 \ –os-type linux \ –os-variant centos7.0 \ –graphics none \ –location ~/CentOS-7-x86_64-Minimal-1908.iso \ –extra-args ‘console=ttyS0,115200n8 serial’ \ –console pty,target.type=serial I would like to send console input from a script and for that reason I tried a named…

Details

OCaml Opam install depext Error

I’m struggling with the depext trying to install it, obviously it’s a big fail. By executing this command opam install depext I get this error [ERROR] Solver failed: “/usr/bin/aspcud /home/toto/.opam/log/solver-in-4016-5f1023 /home/toto/.opam/log/solver-out-4016-58c514 -count(removed),-sum(request,version-lag),-count(down),-sum(solution,version-lag),-count(changed)” exited with code 1 “ERROR: grounder returned with non-zero exit status” I’m actually running this on a ubuntu 19.04 with an OCaml version…

Details