Questions tagged as 'bash'

2
answers

Problems with bash - echo with char! (exclamation)

I'm trying to pass a password as a parameter so the password uses numbers after the char ! example: root@LinDom:~# senha="teste!123" senha="testevim /etc/hosts" root@LinDom:~# root@LinDom:~# echo ${senha} testevim /etc/hosts root@Lin...
asked by 13.02.2017 / 19:46
2
answers

What does the expression "for x in *;" mean?

I saw this expression in a SOEN question, but I did not quite understand what it does. for x in *; do echo $x; done This printed the list of folders in the directory I was in. Is that what this expression is for? What would be thi...
asked by 26.08.2015 / 18:44
2
answers

Ignore the first line

I am using the following command to organize a file: sort -u arquivo.csv -o arquivo.csv But I need to ignore the first line of it, in this case the header. How can I do this?     
asked by 05.06.2018 / 19:15
3
answers

Send PHP variable to Shell Script

I have a .sh file and it has variables that I need to get from PHP, here's an example: //variavel 1 que preciso receber externamente NAME="" //variavel 2 que preciso receber externamente DIR="" tar -zcf $HOME.tar.gz $DIR Calling the...
asked by 29.07.2016 / 20:44
1
answer

Maximum memory consumption in linux bash using openssl with aes

#!/bin/sh SUM = 0 for i in {1..5} do t=$((/ usr / bin / time-f '% e' openssl enc -aes-128-ecb -K 1234567890 -in t -out g 1> /dev/null) 2> &1) SUM = 'bc <<<" $ SUM + $ t "' done res = bc <<< "scale = 4; $ SUM / 5" echo...
asked by 27.04.2018 / 15:30
1
answer

How to remove an alias in bash?

In bash, how to remove an alias? For example, after doing alias man="man -a" , I just want to execute man instead of man -a .     
asked by 09.06.2015 / 15:05
1
answer

CMD, Console, MS-DOS and related terms

Well, it has embarrassed all the concepts that I will list below, and I would like to see the definition of these terms presented, perhaps some are synonymous with others and others are totally different. SHELL BASH Terminal Console...
asked by 06.07.2015 / 05:33
1
answer

recover date from bash ubuntu

I'm setting up a scrip to dump a Mysql server, the name of the generated file is like this (bckp_all_13-09-2018.tar.bz2), however I wanted to store the time too, so (bckp_all_13-09- 2018_14: 44: 22.tar.bz2). Does anyone know how to do this?...
asked by 13.09.2018 / 19:44
1
answer

How to list containers in Docker?

Recently I started doing tests in Docker, I created a virtual machine and installed Debian 9 without graphical interface. I know the command: docker ps Show running containers, are there other commands where I can search if a particular con...
asked by 22.01.2018 / 07:51
1
answer

How to do a check in a linux file based on creation time?

I am mounting a backup script and need to create a check to see if any files in a folder were created in the last 7 days, what is the way to do this? I know that the ls -lt command lists the files in the order of last creation or change a...
asked by 09.07.2018 / 19:00