Questions tagged as 'linux'

1
answer

Recording logs in linux

I have the following code in php <?php function logs($texto){ date_default_timezone_set('America/Sao_Paulo'); $hora = date("H:i:s"); $data = date("d-m-Y"); $log = fopen("log/".$data.".txt","a+"); $escreve = fwrite($log,$...
asked by 24.04.2018 / 19:03
0
answers

How to run JADE (Java Agent DEvelopment Framework) in linux?

How to run JADE (Java Agent DEvelopment Framework) , is it a Framework for SMA, in the latest version of lubuntu? I'm using Lubuntu 32bits - 17.10.1. I'm having a problem running it on lubuntu (the pc I have available for use at the mom...
asked by 25.04.2018 / 12:10
0
answers

Receive serial data, does not work first

I'm using the code below to access the serial port of a raspberry Pi and receive the data sent by the UART, running ALMOST perfectly. When Linux starts and runs the software it stops and does not receive anything, but if it quits and starts a...
asked by 17.04.2018 / 15:53
1
answer

Handle special characters

I am trying to return the CURL with SED, but as the information I get but sometimes has the character / causes an error in the SED syntax. TOKEN=$(curl --silent $URL | awk -F '"' '/content/ {print $2}') echo $TOKEN 2CTVaTm46Uoregv0VcU2QPd1...
asked by 05.04.2018 / 16:08
0
answers

"Undefined reference" error in g ++

When compiling the algorithm with g ++, I got the following problem:    CMakeFiles / libTest.dir / source / mainDaMalha.cpp.o: in function    CriteriosDeParada::test_method()': mainDaMalha.cpp:(.text+0x1840f): referência indefinida para...
asked by 05.04.2018 / 16:24
1
answer

System call dup2 vs. write & read

I'm wondering why in some cases there are examples of conversations in the parent process and the child process - obtained through the fork () system call - that use the read and write functions and in other cases use the dup2.I am trying to cre...
asked by 09.04.2018 / 15:42
0
answers

ssh - error connecting to 4linux

I have a problem with the ssh issue, I'm a beginner in linux and I'm taking a course in 4linux about the basics of Linux and etc ... I'm on the connect part in cloud via ssh. When I did it for the first time it worked out, except for the passwor...
asked by 29.03.2018 / 05:03
1
answer

Treat curl return on Linux

I'm putting together a shellscript and sending a json file to a webservice, the return is as follows: {"success":false,"errorCode":3,"message":"Authenticity Token invalido"} I'm trying, using Linux shell commands, throwing false in one vari...
asked by 05.04.2018 / 14:09
0
answers

Shell Script to automate the installation of programs in Linux

I've put some commands in a simple Shell Script to automate the installation of web site hosting, the basics of the basic: #!/bin/bash # O Script será automaticamente finalizado se encontrar erros set -euo pipefail IFS=$'\n\t' # Ubuntu 16.04...
asked by 23.03.2018 / 00:29
0
answers

Shell script extract extension and search only by name

Can anyone fix my script? The purpose of the script is to compare the input files with the files in the WASTE folder, the problem is that if the input file is teste1.txt it does not find the file teste1.tar.bz2 p> #!/bin/bash...
asked by 23.03.2018 / 14:17