Questions tagged as 'bash'

1
answer

Tips to improve script that creates database backup and can send it by mail automatically [closed]

I have created a script for linux that allows you to backup the DB by saving it in a compressed file with a date and time of elaboration. It is also sent by mail automatically and it deletes the files ".bz2" (which is the format used to comp...
asked by 02.11.2018 / 16:02
0
answers

It is possible to add a file to an already compressed .tar package with bzip2 without decompressing it

Is it possible to add a file to a package of already compressed .tar files? I explain myself better: I have a file mi_home.tar.bz2 , after I compressed it I realized that I have not added a directory to the .tar package, but I already comp...
asked by 15.10.2018 / 19:14
3
answers

Convert months into string to integers?

I have an output of one month: Agosto I want to convert it to whole: 08 In linux Bash, I have the following code ... But it does not work, since it gives me jumps of the line with each converted element: com2=$(cut -d/ -f2,2 tmp_date...
asked by 17.10.2018 / 18:59
0
answers

Replace line and add it; with replaceLine

-I want to replace a line from one txt to another with several ";", but replaceLine is putting spaces instead of the ones; Current Code replaceLine="sed -i '${LINE_NUMBER}s/.*/${date}";"${command}";"${date}/' agenda.txt" The current code...
asked by 20.09.2018 / 01:16
0
answers

Extract data from a file with a column

I have a file file.txt , as follows: 24/9/2018 15:35:19,380 B63201C 9/24/2018 15:35:22,350 ES0101C (initial_time) 9/24/2018 15: 36: 13.231 Execute next service: 0003 9/24/2018 15: 38: 13,664 Result of the execution of 0003 Result: 0...
asked by 03.10.2018 / 15:17
1
answer

Wordpress automated script

I'm in a project where I need to create a script that automates the installation in different. The code: #!/bin/bash cd /home/luis/public_html/1/wordpress/ read to_print cp -R wp-signup.php wp-login.php wp-config-sample.php l...
asked by 19.09.2018 / 14:17
0
answers

How to get a json variable with jsaw from linux?

I would like to request help to achieve the following: My idea is an automatic updater of the Minecraft server, without human intervention I tried to search the Internet, but I can not see how to do it The code that was being used at th...
asked by 12.09.2018 / 19:23
0
answers

Error in Bowtie 2

I am trying to use bowtie for the first time and I get a constant error about the options that I have put to the command. I leave the script. bowtie2 --threads 4 --local --no-unal -x /home/luz_garcia_longoria/workspace/referencegenome/sturnus_...
asked by 12.09.2018 / 10:35
0
answers

Send email with cron and with accents

I want to send an email through a cron, the mail is testing to see what is wrong with other chronons that I have. I'm sending this concretely: #!/bin/bash cat /root/tareas/scripts/test/header.txt /root/tareas/scripts/test/facturas_a_gestionar...
asked by 07.09.2018 / 17:39
1
answer

Accents in Bash

When I generate a query from my database, it returns an information to me, which I save in a variable and then send it by email from the bash using "mail". The problem I have is that, as some words have accents, the Bash does not recognize it...
asked by 16.08.2018 / 17:05