Questions tagged as 'bash'

1
answer

Choose how many rows to display in the output

I'm trying to put a flag -n to be able to show in the output the number of lines wanted by the user, having until now only managed to show the line number next to it case "$1" in ## definir o pósprocessador -r) pp="shuf" ;;...
asked by 08.01.2018 / 22:27
1
answer

Cron job that runs a bash script (which runs a script in python) behaving differently than when executed manually

Hi .. I have a python script that plots two different graphs and that needs to be run daily to update these graphs on a website The data that is used by this script, is in a certain directory in HDF format I created a Bash script that copi...
asked by 15.12.2017 / 13:49
0
answers

Bash Shell - Script to get URL's with word chosen by the user

Good evening, I have a question regarding a bash shell script that will return the URLs present on a reddit page, that is, in a sudoddit. What I got so far was to return the URLs that are on a page inserted in the code and wanted it when running...
asked by 14.12.2017 / 23:05
0
answers

command not found

Another newbie question echo "Enter an integer number" read int checkNum=$(( int % 2 )) if [$checkNum -eq '0' ]; then echo "the number is even" else echo "the number is odd" fi Error when entering any number:    ./ test4.sh: line 9:...
asked by 09.12.2017 / 06:50
2
answers

How to read a string inside an array?

I would like to read a field of type varchar in a MySql database, which contains several dates in the following format: "20171012 20171102 20171115 20171120 20171225" all within an array of type, like this one below: Data[1]="20171012"...
asked by 16.10.2017 / 23:45
0
answers

Duplicate paths in the $ PATH environment variable

I have noticed that the paths I add to $PATH in my .bashrc appear duplicates when I open session in tmux (terminal multiplexer): export PATH=$HOME/miniconda3/bin:$PATH export PATH=$PATH:$HOME/Devel/bin If I print $PA...
asked by 28.08.2017 / 05:22
0
answers

Terminal Xfce does not recognize ruby and rails commands

Hello, when trying to execute ruby commands or rails in the terminal of the Linux Manjaro error occurs informing that the command is not recognized.  I tried to perform the same procedure I used for Ubuntu, but it did not work. Anyone have any t...
asked by 29.05.2017 / 03:27
0
answers

npm | Installation dependencies failed

My system: - Windows 10 - Bash on Ubuntu on Windows I'm new to using bash. I installed nodejs , followed by npm and finally grunt . It worked fine. I used grunt with no problem, but I started having problems usin...
asked by 10.05.2017 / 17:57
0
answers

How to change environment variable path from $ HOME to another?

The intention is to load with you all "created or downloaded" files, and mount it again on any LiveCD distro, leaving it as the default directory. Note that the key to this reasoning logic is to only save files created and come from the int...
asked by 21.10.2016 / 19:22
2
answers

How to write environment variables between shell sections preferably without using a script

I use several shell sections, with different parameters to compile applications for multiple platforms, sometimes need to close a shell and open it again for some reason, a crash or another reason. I use scripts to keep the environment variab...
asked by 04.11.2016 / 13:54