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:

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



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".

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:


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 and do it like this:

bash 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:


if ( $# == 1 )

cat $logFile > tmpFile


while ( $hour -le 23 )
    if ( $hour -le 23 )
        failure=`grep "*,*,*,^(0-10)" tmpFile | wc -l`
    echo "$hour,$failure"
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:


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