Questions tagged as 'bash'

1
answer

Doubt array of bash

I was trying to do the following:    Make a script that adds to an array all the files in the / home directory whose termination is .doc MY SOLUTION: vector=() guardar=0 for i in 'find /home -name *.doc'; do vector[$guarda...
asked by 01.11.2018 / 22:44
2
answers

Obtain hours, minutes and seconds from the date of birth

I do not know if the format of this script is correct or not. I would like to know if I am on the right track and if you could help me in two parameters that I lack and I can not get out. Statement of the exercise: Ask the user date of birth,...
asked by 11.02.2018 / 18:35
2
answers

Use of scale in bash

I'm trying to print an associative vector with decimals on the screen but I can not find a way to do it: #!/bin/bash cantidades="cantidades.csv" line=20 declare -A sumaCantidad declade -A media declare -A numeroCantidades for i in 'seq 2 $lin...
asked by 24.10.2018 / 23:47
2
answers

Comment in bash

I have an Ionic v1 application, where I have some hooks to work with gulp. The hook is: #!/bin/bash gulp dev When I make a ionic run android I get the error    "bash" is not recognized as an internal or external command,   program...
asked by 04.08.2017 / 16:50
2
answers

Save all matches of a group in Regex

Consider the following group: ([0-9 ]+)+ I capture matches that contain numbers and spaces, in the following string for example: 123 , 2133132, 31331, 22222222, 23...... would capture "23", the last match, but what I want is to be abl...
asked by 27.05.2017 / 19:19
2
answers

Search string in directory, sub-directories and linux files

I have this string : MY_STRING and I have this directory : |root |-MY_STRING // <- directorio con MY_STRING por nombre |--MY_FILE.txt // <- archivo con MY_STRING escrito en el |home |-MY_STRING.txt // <- archivo con M...
asked by 11.11.2016 / 18:00
1
answer

How can I create a gif from the linux terminal?

I found the need to create an animated with a gif and after looking at different sites I found a command that is very good without needing to install tools only with the linux ternimal.     
asked by 26.09.2018 / 04:31
1
answer

Like hidden messages from the terminal

I created a code that replaces a directory when updated but gives an error message:    Please try again: mkdir: can not create directory «hello_asm»:   The file already exists mkdir: the directory can not be created   «/ Home / fyxov / Docume...
asked by 30.08.2018 / 19:48
2
answers

how can I change the place where the command line is written

I want to change the ps1 and make it look like that ╔Dir: /root/ ╠cmd: #aqui se escriben los comandos ╚[user1] but I do not know if you can do this .. if you can someone help me ..     
asked by 10.06.2018 / 03:12
2
answers

Convert Windows path to Linux path

I am using .bat and .sh from Windows with CMD and Git Bash respectively. The problem is that I need to convert a path with Windows format C:\Desktop\install-new-cashier to UNIX format to be read from the .sh that I...
asked by 22.07.2017 / 02:39