Questions tagged as 'script'

2
answers

how to get a process launched from a script not to die when the script ends?

I'm trying to launch a dbus client, programmed using a Python script, from another script launched using a udev rule (which runs as root), and I need this dbus client to remain running when the script ends. The dbus client to launch is: #!/...
asked by 26.03.2018 / 19:18
2
answers

how to create a php script that makes a screenshot and modify the name each time it takes the capture

good, my question is the following as I can do to make a script in php that at the time of taking the screenshot I modified the name and I did not change the image already saved .. my code is as follows: <?php function reporte($i){ req...
asked by 24.08.2018 / 21:23
2
answers

How to execute a Mysql Script from java in linux?

I'm trying to execute a script .sql generated with MySQL from a java application, I have read and researched different ways to do it and I have found several options (none of which had worked for me) and I found the following block of code : p...
asked by 14.01.2018 / 07: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
2
answers

Operator test in a conditional

I'm starting to make simple scripts in Linux, and I have a doubt when sending parameters to one. The script is as follows: #!/bin/ksh if test $1 -lt $2 then echo "La cadena 1 es menor que la cadena 2" else echo...
asked by 25.07.2017 / 14:40
0
answers

Automatically extract related data from several tables

I have had to face this problem recently and fixing it manually is tedious and avoiding errors by omission is not easy: Scenario: Preconditions: I have a WORK table with a numeric station that auto-increments. It is the master table...
asked by 16.10.2018 / 09:59
1
answer

Operator 'greater than' and 'less than' in batch

Friends, I have the following script, which I developed as a simple exercise, but I do not work correctly with the logical operators < and > that I understand in Batch are LSS and GTR . Here my code: @echo o...
asked by 21.11.2017 / 02:27
2
answers

Execute bash script, from python, with script in the PATH

I have a folder with multiple scripts that I want to call from Python. I have added the folder to the PATH to be able to call these from any directory. And it has been added correctly: user@myuser:~ export PATH=$PATH:~/misScripts user@myus...
asked by 23.08.2018 / 13:54
2
answers

Redirect to another url depending on the referer

I have this code in the index.php of a domain: <?php if (isset($_POST["redirect"])) { $hash = $_POST["redirect"]; if ($hash !== "") { $origen = isset($_SERVER['HTTP_REFERER']) ? $_...
asked by 18.05.2018 / 23:56
4
answers

AdmiralCloack.lua: 54: 'then' expected near ')'

function Cloaks:Init() if (file_exists)(Cloaks.DB) == false) then print('Creating Admiral Cloak Database') table.save({},Cloaks.DB, FILE_WRITE) end end     
asked by 10.09.2017 / 17:35