Linux – How do shell script commands in a SH file run in parallel?

I'm trying to back up tables on my database server.

I have about 200 tables. I have a shell script that contains commands to back up each table, like:

backup.sh

psql -u username ..... table1 ... file1;
psql -u username ..... table2 ... file2;
psql -u username ..... table3 ... file3;

I can run the script and make backups on my computer. However, since there are 200 tables, the commands are executed in sequence, which takes a long time.
I want to run the backup commands in parallel. I've seen articles that have been suggested to use them && after every command or use nohup command or wait Command.

However, I do not want to edit the script and insert about 200 such commands.

Is there a way to execute this list of shell script commands in parallel? something like nodejs does? Is it possible to do it? Or do I see it wrong?

Shortcuts – What is the correct syntax for executing commands in CompizConfig keybinds?

I actually use Linux Mint, but Ubuntu is close enough for this purpose.

I want to specify a keyboard shortcut to execute sharenix-section every time I press semicolon, My problem lies in the Commands tab.

In the command line I know to do:

cd Downloads

then

sharenix-section

But how do I write this in CompizConfig?

(I tried cd Downloads && sharenix-section but that did not seem to have any effect)

Web application – Sudo has parameterized all commands. Is that safe?

About this question
Sudo white list only program Perl
I think I have found a possible solution with only sudo

have a program Perl and make chmod + x executable

in sudo whitelist this program and nothing else, i test it and work

because within the program exists the location binary perl hashbang or sh-bang
In the case of sudo white list only program perl you have to perl binary and the program white list

Within Perl you can set the taint mode, ops and safe

That is, you have a helper or wrapper perl program (this has all the rights of sudo, since this working whitelist contains a single program) within the program where you must parameterize all commands, as in the dispatch table.

Regarding Hashbang or Sh-Bang security, I've read that a case of Perl would redirect to another interpreter:

The change to hashbang redirection introduced in Perl 5.24.0, where Perl redirects to another interpreter (Perl 6) if a hashbang path is found containing "perl" followed by "6".
Source: https://perldoc.pl/perl5241delta

Is this solution safe?

Flash Network – What is the difference between the commands listpeers and listnodes?

list peers

listpeers Returns data to nodes to which you are connected OR to the nodes with which you have an open channel. If you have opened a channel with a node but the connection to that node has been lost, the node is still displayed in the output "connected": false, If you are connected to a node but have no open channels, the output will be returned with "channels": [],

If you want to get information about a specific peer, not all, you can add the node ID of the peer as follows: lightning-cli listpeers , You can also query log entries related to the peer by passing the command: lightning-cli listpeers where can be io. debug. info, and unusual, Log levels can only be queried if a node ID is specified.

nodes list

listnodes returns the information of all nodes in your local network view. This information is collected through the Klatschnetz. If you are the listnodes If you run the command without a node ID, the RPC returns the information of ALL nodes in your view. If you are interested in the information of a particular node ID, you can do so by passing the command: lightning-cli listnodes ,

Device stops responding when attempting to write to / system partition. None of the mount commands worked

I have a TB-X304L. I've rooted this guy with magisk and every time I try to write or change permissions on the / system directory, the tablet just freezes and I need to restart it with a long press and the volume up key. I can not even make changes to the build.prop file. The same thing happens when you try adb. I could get root access in the ADB shell. when I try

cat > testfile.txt

It is called read-only partition. So I mounted it with the command rw permission

mount -o remount,rw /system

it runs smoothly. But if I try

cat > testfile.txt

Enter text for the test file again and press Ctrl + D. The file freezes. I'm new to all of these, please help me guys.

linux – How to use grep commands to find a specific value in a text file

I need to get a file called daily_fails_count.csv, but I can only find the number of errors.
In this file, this is on a shorter scale:

January,1,0,0
January,1,1,0
January,1,2,0
January,1,3,0
January,1,4,0
January,1,5,0
January,1,6,0
January,1,7,0
January,1,8,0

The format is "month, day, hours, error". It goes through all months. The last value indicates the number of errors found at this time. I know everything here is 0, but that's because there were no errors found, other data has errors.

I am not very good with grep commands in Linux scripts, so my question is how to grep to find just the last digit in the file?

I write this script in a file called make_accum_fail_counts.sh and do it like this:

bash make_accum_fail_counts.sh daily_fail_counts.csv > accum_fail_counts.csv

So I use the file daily_fail_counts.csv as input for the new script. Here is my screenplay:

#!/bin/bash

if ( $# == 1 )
then
    logFile=$1
fi

cat $logFile > tmpFile

hour=0
failure=0

while ( $hour -le 23 )
do
    if ( $hour -le 23 )
    then
        failure=`grep "*,*,*,^(0-10)" tmpFile | wc -l`
    fi
    echo "$hour,$failure"
    hour=$((hour+1))
    failure=0
done
rm -rf tmpFile

I just need help with my grep command:

failure=`grep "*,*,*,^(0-10)" tmpFile | wc -l`

Just to find the failures by the hour under all the days. The output would be:

0,1000
1,1040
2,2888

For 1000 errors between 0: 00-1: 00 and 1040 errors between 1: 00-2: 00 and so on. Thank you in advance.