Questions tagged as 'shell-script'

1
answer

ADD DATA IN LINUX

How can I do to subtract the values of the number of tickets sold per event to the total number of seats in each tribune of the event to know the seats available for that event? function menu { echo "MENU PRINCIPAL" echo "1. Consultas" e...
asked by 03.11.2018 / 02:47
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
2
answers

How to identify values in a string

We are making validators of expressions which are loaded in a database. The challenge is to take that expression, for example: Objeto.getNombreFuncion("123").getAttribute("Nombre_Etiqueta") && Objeto.getNombreFuncion("Otra_Etiqueta")....
asked by 12.08.2018 / 00:05
0
answers

Problem with running a kataloon test on the ubuntu console

Hello good afternoon run a .sh script in the console on a python code, this runs without any problem but when I copy the program back to the mother folder of my repository it gives me an error, there is some way to change the route relative? Bec...
asked by 07.08.2018 / 21:36
0
answers

Store variables in Bash from a result in postgreSQL

I have a Bash script on Linux: psql postgresql://postgres:****@****/**** --quiet --no-align --field-separator ' ' -t -c "SELECT * FROM *" | while read -a Datos_Consulta ; do Where I store the data of the variables as follows: DATO1=${Dato...
asked by 29.06.2018 / 16:55
0
answers

Error in the cp command in shell script

I have the following code written for a shell script #!/bin/bash if [ ! -f "$1" ]; then echo $1 "no existe" else A=$(ls $1* | wc -w) if [ $A -ge 9 ]; then echo "Se ha superado el número máximo de versiones" else Num=...
asked by 19.03.2018 / 18:26
2
answers

Replace literal in .html with Unix

I have a series of scripts declared in an html with the following format: xxx.jfhdskfjhdskjfhdskjfjioe3874.bundle.js. The part between the points is a dynamic hash, but it will always be an alphanumeric with the same positions. My problem is tha...
asked by 01.03.2018 / 11:12
0
answers

Control interactive program from a shell script

I have a small interactive application where I have several types of commands (play, stop, exit). I want to prepare a script to automate the testing processes. The problem is that I can not find a way to launch my application through a shell...
asked by 28.02.2018 / 09:49