Questions tagged as 'bash'

2
answers

Connexion to a server via ssh

I want to know how I can connect to a server via SSH putting all the data ( user , host , password ) in script .sh , I need this script .sh to be executed automatically by cron and that this access a database on t...
asked by 24.11.2016 / 17:30
1
answer

Comment a line in a file.log

Good, I have the following code: !/bin/bash while read line; do echo "$line"; if[???????] fi done < /home/javi.log javi.log file: # javi_2223 javi55_555 imp33 imp44 javi32423 javi5646 I want the script to comment...
asked by 19.12.2018 / 19:21
3
answers

BASH: compare two arrays with IF

I have the following problem: I compare two arrays, the first is a file and the second array stores the previous data from the first array. The idea is that when comparing the arrays a repeated data is not inserted to perform the operation on...
asked by 23.05.2018 / 21:07
1
answer

Error opening the Mac Terminal

For some time now, my MAC terminal has given me an error every time I open a new screen of my terminal, I have been searching for information from Google and the truth is that I have not found anything convincing, I show you the error: -bash...
asked by 10.05.2016 / 19:34
1
answer

git bash error: / mingw64 / bin / git: Argument list too long when executing "git add *"

I am working on a project and I am creating the initial version by adding the base files. The problem comes when I try to add all the files in the folder (I previously created the file .gitignore with the corresponding) with the command git ad...
asked by 08.03.2018 / 00:08
2
answers

bash script closes without further execution

I have a script that worked quite well to date. This makes several simple queries to mysql and then acts on a table of several million records by deleting matches with another table. The issue is that the last job was much heavier than the pr...
asked by 21.08.2016 / 14:01
2
answers

Is it necessary to install Git in Windows 10 if it already exists in Bash Ubuntu?

I just bought a computer with Windows 10 (so far I've only used Windows 7, I did not need Windows 8 and 8.1). The first thing I did with this new toy was to install Ubuntu Bash. I've tried this bash and it's decent to be a beta version (I'm goin...
asked by 16.07.2017 / 04:01
1
answer

Run crontab using "notify"

I explain the problem a bit above, but basically that's it. I want to add a script in crontab that runs every minute. The script, on the other hand, should show a simple greeting message. He has no more. Chrontab line: * * * * * sh /tmp/not...
asked by 17.05.2016 / 13:04
2
answers

automatic consultations to mongodb once a month

I have to perform an operation for each document of a collection on a specific day of the month and save the results in other documents from different collections, my question would be which is the best way to do this, it would be with a bash sc...
asked by 27.12.2016 / 17:28
1
answer

Run a script with content in crontab format

It's my first question in the forum, I tell you because I want to do this, I have a little program with a view in html to redirect the incoming calls from one phone number to another, we select the date / time of passage, recipient and finally w...
asked by 23.05.2016 / 21:49