Questions tagged as 'shell-script'

1
answer

Slow bash script

I use a bash script to translate words from other languages into Portuguese. It always worked very well, but for a few days it got extremely slow, to the point that I could not use it. Home some people informed me that the problem could be in th...
asked by 16.09.2017 / 02:49
1
answer

What command is being used wrongly in this script?

When I run the script, I get the error message that grep was used wrongly, what's wrong with the script? Code: #!/bin/bash read $ALVO RESULTADO=$(ps -A | grep $ALVO) $RESULTADO kill -KILL Error message: sublime Uso: grep [OPÇÃ...
asked by 12.03.2017 / 07:19
1
answer

Script for GIT update

I have a question and I do not know how to solve it. It happens the following, I created a script in sh called atualiza.sh inside it I have the following code. git add . git commit -m"atualiza rotina" git push xxxxxxxxxxx My g...
asked by 07.12.2016 / 12:44
1
answer

Bash program does not display data output

Good afternoon, I'm programming in C and it's the first time I'm programming in Bash (shell-script). I did some bash functions, learned to call and created an interactive menu with the user, my program does "basically" reading a wordlist a...
asked by 26.12.2016 / 17:08
1
answer

Root permission to change date and time [closed]

I would like to know how I can get my script to change system date and time without asking to enter the root password?     
asked by 22.11.2016 / 23:32
1
answer

ssh connection between computers

How to make a connection via ssh between a local pc and a server, with method of authenticated by keys.     
asked by 29.04.2016 / 21:58
1
answer

Underline between two variables

I have the following code in a .sh file: echo "$pasta/Dados/$MA/$ano\_$mes/$tabela" With all variables set correctly. However, there you run the script, echo results in data-integration/Dados/MA1/2015\_11/HT_MA1_ESS_SEG While I would...
asked by 12.02.2016 / 20:57
2
answers

Shell script Sed read one file and write to another only on the first occurrence of a string

Good afternoon, I'm trying to read from an X file and write to a Y file when a specific String appears. But I just want to do the inclusion once. Example I'm trying to do: sed -i '/, pasta/r teste.txt' Report.html This command is reading...
asked by 01.12.2015 / 17:22
1
answer

ShellScript command 'cd'

What command do I use to go straight to the login folder without having to put my example name cd home/leonardovillela .?     
asked by 10.10.2014 / 20:56
2
answers

How to create a shell script that puts an echo at the beginning of each line in a file

I need to create a script that inserts the echo command at the beginning of each line of the file and at the end > > blocodenotas, for example #!/bin/bash ls -l uname -a netstat -tunap I want a script that turns this into: echo "#!/...
asked by 13.12.2018 / 20:39