Questions tagged as 'bash'

1
answer

Python command not found in Windows 10 with the subtyme of linux

Well, it turns out that I have installed Python in Windows 10 and recently installed the bash in ubuntu that is now available in these new versions, but when I do the typical python to run it, it gives me the error message when I can not find it...
asked by 14.06.2017 / 14:59
1
answer

How can I get the ip from my OS (Guest) Windows XP mounted on VMware from Linux by console?

I need a script or it can be a vmware workstation 12 command for an instruction which gives me the IP address of the OS mounted on this virtual machine, which in this case, is Windows XP. My host or host machine is Linux. This I want becau...
asked by 30.11.2016 / 18:41
2
answers

You can pass variable from bash to php

I have a question that I do not know if it is not possible or that I do not know how it is done. If I have this code php: <?php $salida = shell_exec('bash prueba.sh'); echo "<pre>$salida</pre>"; exit; ?> and this in bas...
asked by 15.12.2016 / 00:34
2
answers

bash syntax error

I have changed the code, now I do not execute the instruction dd #!/bin/bash while true do echo "Bienvenido al instalador de sistemas operativos en pendrive" echo "Indica dónde está la iso a intalar" echo "Si quires salir pulsa la tecla...
asked by 04.10.2016 / 20:26
2
answers

Replace part of text with Script [duplicate]

I'm starting to program and I have a question, I have a lot of .txt to which I have put the same extension in a line, I want to change that word in each of the .txt for those in a list, I do not know very well as I go through the list so that...
asked by 09.11.2018 / 07:52
0
answers

script in bash to store the result of a Mongodb query

I hope that someone can help me. I need to create a bash script that connects to a Mongodb: mongo --host mongodb://IP:PORT,IP:PORT/admin?replicaSet=rs0 -u admin -p passadmin select the db: use Data and launch the query: db.OPERATI...
asked by 11.10.2018 / 12:27
0
answers

Reading problems with CSV and PHP [closed]

I tell you my problem: I download from Facebook a list of potential customers obtained to hear canoalas advertising. That file is in CSV UTF-16 format. What I do first of all to modify the encoding and pass it to UTF-8 is: iconv -f UTF-1...
asked by 14.08.2018 / 15:59
0
answers

Is it possible to use lib * .so shared libraries with bash?

I know that with python you can use them using ctypes and I The question arose whether they could be used in any way in a bash script. I've been looking for information but I have not found anything so I guess you can not. Is there a way to ma...
asked by 02.06.2018 / 14:25
1
answer

grep in several bash lines [closed]

I want to find several lines within a file. If I have 3 lines I do not have any problems because I use the following to show the last line and the previous 2: grep -B 2 "lo que busco" But my question is: what happens when I want to look...
asked by 16.04.2018 / 04:19
1
answer

Error "connection closed" in SSH access to CentOS 7

I'm starting to manage a server in this case, CentOS 7 . After having used for a few days a user who accessed well from SSH and SFTP , I lost all access to the server. I have been reading in several forums, and I have...
asked by 22.12.2017 / 16:23