Questions tagged as 'bash'

2
answers

Handling dates in AWK scripts

CONTEXT: I have a CSV file from which I want to extract and process some columns. I realized that AWK would be the perfect tool for this and everything went well until I had to deal with timestamps - for example 2008-07-31T21: 42: 52.667...
asked by 07.08.2014 / 17:26
2
answers

Unexpected exit

I'm running this command to remove repeated lines from a file: cat arquivo.csv | (read;echo "$REPLY"; sort) | uniq > arquivo.csv But when I look at the file, it is blank rather than just the lines that do not repeat themselves. What am I...
asked by 18.05.2018 / 18:41
4
answers

Variable interpolation in shell script that returns the output of a function

I've solved a problem with a larger script I'm producing. Basically I have a function that returns the current date and time in a specific format. I need every time the variable data_hora is printed on the screen, its values are updated f...
asked by 28.12.2015 / 03:43
1
answer

Checklist and Dialog with external file - Shell Script

I need to use Dialog doing a Checklist from an external file, so far I've done the following: dialog --stdout --checklist "Contas de e-mail: " 0 0 0 \ while read line do $line "" on \ done < contasemail.txt But I'm getting the f...
asked by 26.09.2017 / 15:57
1
answer

Automate enter input on command line while executing a bash script

I created a bash script to automate the installation and configuration of my environment needed to run my project, but some of the tasks require that the actions be confirmed by entering enter, I would like to know how I can automate this input...
asked by 01.11.2016 / 18:24
1
answer

Store user logged in .bat variable

I have to create a bat to automate the installation of the company's standard programs, but one in particular is giving me a headache. The installer of one of the programs, by default, creates the path C: \ app \ client \\ product \ 12.1.0 \...
asked by 18.04.2017 / 16:02
1
answer

Regular expressions with 'grep'

I need to extract data from a text and I'm trying to do this using grep. But the way to make use of regular expressions with this command are quite different from what is usually done in Ruby or JavaScript, and I am not able to do what I need. I...
asked by 02.04.2015 / 23:13
1
answer

Calling another terminal with python

I'm doing a project here and need to open another terminal window, which runs the command ls . I have tried with subprocess but it gave error: Traceback (most recent call last): File "tests.py", line 8, in <module>...
asked by 21.01.2015 / 15:53
2
answers

Script to open index.html from multiple folders

How to make a script in bash that: Based on this example url: link Select the 12620 folder. Open the index.html of this folder in a Firefox tab in Kali (Debian) Select folder 12620, add +1, getting 12621, and open index.html from tha...
asked by 20.09.2015 / 21:32
1
answer

Diff changing rows

I'm comparing two files, which are updated daily, with the diff -y command in order to get two results: The first are the lines that have been modified from one day to the next: grupoAzul;Gabriel;04-maçãs;02-limões | grupoAz...
asked by 31.07.2018 / 17:58