Questions tagged as 'shell-script'

1
answer

Control of database (MySQL) in production environment

For a good part of my project I have been working with a git repository on a local server, (Debian 7), this week I migrated to gitlab, with no complications in the change, I only changed because of portability, since I'm always working on a loca...
asked by 07.08.2017 / 20:57
1
answer

Help with script that maps routes

I made a script that traces the route of a certain IP, but with the while going to 50, even if the connection has an 8-route jump, it will count to 50, how do I stop the while when I finish number of routes? #!/bin/bash echo "Digite um IP: ";...
asked by 15.05.2017 / 14:53
1
answer

PG_DUMP via shell_exec returns "no password supplied"

I successfully execute the following command through the terminal: pg_dump -d teste -h 127.0.0.1 -p 5432 -U postgres -w -f /home/william/pgsql/17032701.backup However, when I execute the command by shell_exec of PHP , I...
asked by 27.03.2017 / 03:30
2
answers

How do I get a part of a filename in shell script?

I have a file that has the format nome1-nome2-0.0.0.0.war , and through the shell I wanted to get the version (0.0.0.0) and save it in a variable and then use it to create a directory . Note: Versions change, but the names and exten...
asked by 21.03.2017 / 20:37
1
answer

Shell Script - Refresh page every 5 minutes

I need to update a webpage (eg www.google.com) every 5 seconds, as I have no idea how to do this script. Can anyone help me? Thank you     
asked by 22.07.2016 / 18:26
1
answer

Problems inserting commands in bashrc via script

I'm trying to enter commands in bashrc via script. I run the command source powerpyenv.sh # powerpyenv.sh echo '### Added by pyenv' >> teste echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> teste echo 'eval "$(pyenv init -)"' >...
asked by 21.02.2016 / 20:08
1
answer

Extract information from a text file with shell script and regular expressions

I want to make a script with a shell script that extracts from an emoticons text file, for example ;) , :) , :3 , :( , xD and also count the emoticons of each sentence. A statement is declared positive if the sum o...
asked by 09.11.2015 / 20:53
1
answer

Problem with upstart script

I'm trying to start my application at boot, but I'm not getting it ... the upstart script calls another script, I can not even know if the 2nd script is being called, it follows the 2 scripts: 1st Script description "Start OpenProject" star...
asked by 17.07.2015 / 17:06
1
answer

Script linux Artisan Laravel

I hired a shared server, which runs scheduled tasks ( CRON TABLE ) via linux scripts (.sh). How do I run a php artisan ( php artisan enviar:emaildiario ) command inside this linux script? Server UOL: Script:     
asked by 29.11.2018 / 23:09
0
answers

Write to a Shell Script file

I have a problem with writing a line in a file using Shell Script. I've tried to use sed and echo, but in both I do not have the expected behavior. Using sed: sed -i -e 'export LS_OPTIONS='--color=auto'' /root/.bashrc Using echo: echo...
asked by 26.11.2018 / 22:39