Questions tagged as 'shell'

1
answer

Adduser in Shellscript [duplicated]

I have to create a script that can receive up to two parameters: In case you receive 0 parameters the script has to show the login of all system users. In the case that it receives 1 parameter if parameter 1 is "-h" that shows a help or...
asked by 13.05.2018 / 15:30
4
answers

Folder permissions on ubuntu

Hi, I have an installation with ubuntu where I'm going to use apache as a web server. For this I have created a folder in / var / www / html / tests Where I created a series of files for example "index.php" The problem I have is that if...
asked by 17.11.2017 / 17:02
2
answers

How to compare a variable with a string in Shell Script?

I'm trying to compare a variable with a String but I have not found a way to do it, the variable is the result of a function, which result can be "Terminal" or "Server", which I can print without any problem, the problem is that I can not find a...
asked by 27.09.2017 / 23:23
1
answer

I have this KSH script, but I can not execute it, does anyone know why?

Obviously I gave him the execution permissions with chmod and tried to execute it with "ksh" plus the name of the file and the parameter, but I could not execute it, they are only validations ... #!/usr/bin/ksh #Variables generales P_FECHA=$1...
asked by 25.04.2017 / 22:39
1
answer

Unexpected operator in bash [closed]

I'm doing a bash script to automatically configure the network. When I finished it I put it in link and it did not give me any mistakes. However, when I run the scritp I get an error on line 58. The error is this:    configred.sh: 58: [: ye...
asked by 07.05.2017 / 12:51
1
answer

Bash "file.sh" error in if extracting cat output to a variable and comparing it in if

When extracting the variable, everything is correct, but it does not compare it to me, any help? camMode= sudo cat data.txt; echo "$camMode"; if [ "$camMode" == "True" ]; then echo Mode is true fi if [ "$camMode" == "False" ]; the...
asked by 27.12.2018 / 13:40
1
answer

dynamic cd shell linux

I need to run a shell that makes a dynamic cd. This in order to work on several servers does not matter your folder settings. The idea is to do something like this: var=$(pwd) cd $var in the folder where the sh is there is a file that I n...
asked by 30.08.2018 / 18:55
1
answer

Run autoclick in the background

I wanted to run an autoclick but it only worked with the maximized terminal, when it was minimized by pressing f1 I did not answer the clicks I was reading a post on execution in the background but I did not understand how I could do it here is...
asked by 26.07.2018 / 06:26
0
answers

CI in Jenkins (form, plsql and reports)

I just left my boss to check how is it possible to do an IC within Jenkins with form, plsql and reports, honestly I have no idea what he is talking about so I would like to see if there is someone here who can help me clarify a bit the panorama...
asked by 26.07.2018 / 19:07
2
answers

shell unix is not running from java

Hi, I have the following code that connects to my Linux server (AIX 6.1) and executes a command: import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; import com.jcraft.jsch.Session; import java.i...
asked by 24.07.2018 / 20:16