Questions tagged as 'bash'

0
answers

Restart Windows Subsystem for Linux without restarting Windows completely [closed]

As many already know, Microsoft has released a new feature for Windows 10 called "Windows Subsystem for Linux" which, among other things, promises to run natively (not an Oo virtual machine) Bash, as in the case of so talked about Bash on Ubunt...
asked by 30.06.2016 / 07:56
1
answer

How can I find the user in Ubuntu (Shell / Bash)

I want to create a system that should interactively find the user and subsequently tell whether the user exists or not. I must provide the username and if the user is found then the system found the username and enter, if not say there was an er...
asked by 12.10.2015 / 13:37
1
answer

What is the xargs command for?

What is the xargs ? For example, I've seen examples ls pasta/ | xargs -l git update-index I saw that this was being used because the git update-index command does not work with folders. But in practice, I do not know wha...
asked by 21.03.2016 / 20:38
2
answers

How to get the local ip in shell-script?

I'm doing a script that needs the IP of the machine on the network, tried in many ways without success until I discovered a way: ip="'ip addr show | grep global | grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|2...
asked by 07.08.2017 / 04:21
2
answers

Filter number of characters with SED or grep

I have a file with strings I need at first to filter for example only rows that have 5 characters And secondly filter only those that have at least 2 characters repeated together Example: Display aazyx or zyaax but does not display azyxa And thi...
asked by 22.11.2017 / 00:47
2
answers

How to rotate a bash file "mytest.sh" to a MAC without using "./", using aliases and in a global way?

I have a mytest.sh file that will be distributed among other users (all with mac). I want to know what has to be done so they can run the script from this file, from anywhere (in a global way) without having to use ./ and sweating...
asked by 20.11.2017 / 17:11
2
answers

How to check if a server is in .ssh / known_hosts?

I have a script that syncs git repositories. If the repository has never been synchronized, the directories are created. Eventually, when a repository is added, the server that serves the repository is not listed in the .ssh/known_hosts...
asked by 24.09.2014 / 23:00
2
answers

Logic error shell script

I want to print a message on the screen according to the current time of day but it always falls on the other, what would be the error? I've been to 1h and I do not understand the error.     
asked by 07.07.2018 / 00:08
1
answer

How to send multiple folders using SSH (SCP)

I have a "deploy.sh" file that has the following command: scp -r ./public_html [email protected] -p 9922 But the command is giving error:    No such file or directory But the public_html folder is in the s...
asked by 20.10.2017 / 14:07
3
answers

how to commit a cloned repository?

Yesterday I created a repository in github and gave some commits, today already in another machine I cloned a repository and I am trying to commit changes but I can not. process ... I have done so far $ git clone 'repositorio' $ git init...
asked by 27.03.2018 / 16:43