Questions tagged as 'shell-script'

1
answer

Error in parameter passing to a Shell Script

I'm creating a script to get some images in the folder and with this generate another image, I'm using Imagemagick, but the problem I'm having is in passing one of the parameters of this script I'm putting together and gives me this error: mon...
asked by 25.01.2017 / 04:08
1
answer

Monitoring folders in Linux

I need some help. I need to mount a shell script that is monitoring 4 folders where each one receives a file with template different from the other one. I need an e-mail to be sent to me when I get there. I am new to shell and have not...
asked by 29.04.2015 / 14:43
1
answer

Force a shell script to run in the terminal

   The user will download the script from an internal site and run it. What I wanted was that after the download the user gives two clicks on the script and it runs and does not open for editing. Is there a way to force a script shell...
asked by 21.12.2018 / 18:53
1
answer

How can I turn "to" into a bash script

I made a small script in Python that transformed a .py file into a bash Linux script, however, the quotes that are inside the Python file end up making the script not work. Is there any way I can transform all% of a text in bash to "...
asked by 02.12.2018 / 12:23
1
answer

.TAR AutoInstalavel Linux package

I'm following this procedure to create a file compactado autoexecutável but I'm not succeeding, is there something missing? Compact the files to pacote.tar.gz I create pacote.sh file with the following content:...
asked by 13.09.2018 / 16:21
1
answer

SED replace the same case for something

I'm trying to replace occurrences of "strings that appear in the document" by another value in the case '' nothing; I have the following code snippet in shell script mkdir NOVO for script in *.sql do sed '/from/ s/fev_\|jan_//g' $script...
asked by 27.06.2018 / 04:01
1
answer

Get the latest version of Mozilla Firefox via script

I was doing a script that looks for the latest version of Mozilla Firefox in the URL #!/bin/bash base_url="https://download-installer.cdn.mozilla.net/pub/firefox/releases/" href_pattern='s/.*href="\([^"]*\).*//p' last_version=$(curl -s $base...
asked by 14.03.2018 / 13:00
1
answer

Editing file with links in shell script

I have a file with 130 links to make downloads via wget , all files are with links listed such as: http://minhateca.com.br/Animesdojonny/Desenhos/THUNDERCATS/Thundercats+-+Completo/Thundercats-EP001,743727846.rar http://minhateca.com.br/...
asked by 29.03.2018 / 01:06
3
answers

How to have 'apt remove' response via shell_exec with PHP or Python?

With the shell_exec command I get a response if the result of the executed command is a single text: shel_exec('dpkg -l > list-softwares-dpkg.txt'); How to have the answer (in PHP or Python, would another command need to have an answer?)...
asked by 12.02.2018 / 22:43
2
answers

Shell Bash, How to pass data from shel as parameter

I need to run a file1.sh file, but I also need to get the data that comes after it, for example: file1.sh 171.55.8.45, that ip that comes after, on the same line as the file, before pressing enter , I need this ip to be read and passed as a para...
asked by 15.12.2017 / 13:43