Questions tagged as 'bash'

1
answer

Keyboard shortcut for an executable script on ubuntu

I have an executable hosted on my desktop, and I would like to create a shortcut to open it, but I do not know how to do it? if it were in the directory where the executable is located, it could write inside the terminal ./file but I want...
asked by 13.08.2018 / 01:37
2
answers

Read TXT file and convert certain values into variables

I have to compare the sizes of some folders to make a% difference between them and depending on the result send an email. I want to make the for for each SITE folder, the SITE folders are all from a directory, ... / backup / SITE1..2..3....
asked by 09.08.2018 / 16:42
1
answer

Run autoclick in the background

I wanted to run an autoclick but it only worked with the maximized terminal, when it was minimized by pressing f1 I did not answer the clicks I was reading a post on execution in the background but I did not understand how I could do it here is...
asked by 26.07.2018 / 06:26
0
answers

Store variables in Bash from a result in postgreSQL

I have a Bash script on Linux: psql postgresql://postgres:****@****/**** --quiet --no-align --field-separator ' ' -t -c "SELECT * FROM *" | while read -a Datos_Consulta ; do Where I store the data of the variables as follows: DATO1=${Dato...
asked by 29.06.2018 / 16:55
6
answers

What does the symbol '~' mean in Bash?

What does this symbol mean ?: ~ I've seen it appear when you are going to install some components such as: php ~/composer.phar require cboden/ratchet or when I make a cd in the root: analistasistemas-VirtualBox / # cd analistas...
asked by 06.02.2018 / 17:09
1
answer

script delete folders according to the current date

I have made a script to delete folders when the disk is, for example 80%, I want to use it in centOS with asterisk. where folders are organized "/ var / spool / monitor / 2018 / {01/02 /.../ 12}" Well, I did this script that erased 2 months a...
asked by 20.04.2018 / 18:55
1
answer

How can I select the lines between two patterns?

   Question and answer based on my own question and answer in How to select lines between two patterns? I have a file like the following and I would like to print the lines that appear between the patterns PAT1 and PAT2 . 1...
asked by 14.03.2017 / 16:16
0
answers

How can I get the output of a docker script from a php script?

I have a php script that executes a docker image and waits for it to continue, but it is not implemented asynchronously; therefore I have to wait a while to check if I have an exit or an error. Here goes the code. $action = "timeout 5m bash sc...
asked by 20.03.2017 / 21:49
1
answer

how to make a PG_DUMP from a script, that allows me to choose which database to ignore and which ones do not

I am developing a Script in the Bash , for the automation of the creation of the Backups for the Postgresql engine. strong> in Centos , but I need to be able to ignore the databases that you define in a variable. and save the Dump in th...
asked by 10.05.2017 / 17:21
1
answer

Upload busybox to router ftp

I am doing a test on my router at home, I would like to know if it is possible to upload the busybox to the ftp server or telnet that has the gateway to use the linux options. I have searched the web for documentation but I can not find anything...
asked by 10.08.2016 / 17:48