Bash is the shell used in Ubuntu's command-line interface.

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Why doesn't Ubuntu/Debian package upstream loadable bash builtins ($bash_src/examples/loadables)

There's a bash-builtins package, but it only comes with sources and headers. The sources go to /usr/share/doc/bash-builtins/examples/loadables/ (for some strange reason), and they don't even compile. ...
0
votes
0answers
104 views

$PATH problem in 16.04 “WARNING: your PATH doesn't contain …”

I use ubuntu 16.04 and trying to install a simulator (Omnet++). When I try and configure, it gives the below warning: WARNING: your PATH doesn't contain /home/aboubakar/omnetpp-5.0/bin! Add the ...
0
votes
1answer
26 views

Why won't bash files run in Ubuntu? [duplicate]

I am running Ubuntu Desktop (so, there's the graphical interface that I'm using). When I double click a '.sh' file, I was expecting it to run. However, it opened up gedit instead. I enabled the ...
1
vote
0answers
95 views

have: command not found [closed]

Whenever I open up my bash and login into a sub-shell I get the following error -bash: have: command not found -bash: have: command not found -bash: have: command not found -bash: have: command not ...
1
vote
1answer
50 views

Unable to run docker-machine despite trying to add path

I downloaded the docker toolkit from docker. I tried to change the .basrc, .profile, .bash_profile, /etc/environment file by adding /usr/local/bin/ or /usr/local/bin/docker-machine but I am still not ...
0
votes
0answers
27 views

Custom script not working as expected in ubuntu [duplicate]

I wrote a java application, want to register it as a service, so wrote a bash script in /etc/init.d/. Here is the script: #!/bin/sh # # chkconfig: 345 50 83 # ### BEGIN INIT INFO # Short ...
0
votes
0answers
60 views

Crontab - export DISPLAY=:0.0 or .sh script won't run

I have written a basic script to familiarize myself with crontab that changes my wallpaper every minute with one random image from a set folder: #! /bin/bash PATH=/usr/local/sbin:/usr/local/bin:/...
3
votes
0answers
84 views

Bash Script Works On Command Line but not at startup

Let me ask this another way: There are at least (2) ways to have a bash script called automatically when a user connects to OpenVPN: Placing the script in the /etc/network/if-up.d folder Renaming ...
2
votes
1answer
77 views

How to Integrate Dropbox in Thunar?

How can I integrate Dropbox into Thunar? I am using Xubuntu 14.04 with Xfce 4.12 installed via PPA, and thunar-dropbox-plugin has been broken. I have also heard that it is not working on Xubuntu 16.04....
1
vote
2answers
71 views

Problems embedding a command in Bash PS1

Hi all I am having problems trying to embed this command in my bash prompt so that it will update itself each time the prompt is shown. I would like it to be part of the prompt itself free -m | tr -s ...
0
votes
0answers
20 views

howto show all packets with a certain dependency [duplicate]

i want to find out which packets link to openssl on my system. what would be the bash command to get that information. i know that using ldd /path/to/file i can see what links to a certain binary or ...
-1
votes
1answer
22 views

Survival of manually edited variables

I have some environmental variables set in my .profile, and thus the variables can be set automatically when I log in. In some special cases, I also need to change some settings using the command "...
2
votes
0answers
28 views

Scheduling Cron Job for a Specific Hour Range in a Week

I'm looking to run a cron job for specific hours in a week. The reason I'm doing this is due to the timezone being pegged exactly 7 hours ahead of New York time irrespective of daylight savings (this ...
2
votes
1answer
44 views

What does :(){ :|:& };: do? [duplicate]

What does this do: :(){ :|:& };:. I was reading through encyclopedia dramatica and saw that command. It just being above rm -rf / --a-flag-we-don't-mention-here makes me anxious about trying it ...
0
votes
0answers
134 views

Can't execute .sh file that works finely through the terminal in Xubuntu 16.04

My first attempt with scripts, is a shortcut to open a Jupyter Notebook on a specified folder from an file on the Desktop called ipython.sh. The content of ipython.sh is: #!/bin/bash cd ~ ...
0
votes
0answers
37 views

Terminal fails to connect to a proxy server

I am trying to connect to the proxy server of my university. I have successfully logged in to proxy via firefox but when trying to use ftp or wget I get the following error: Resolving proxy.xyz.ernet....
1
vote
0answers
90 views

Launch python script fullscreen on startup (Ubuntu 14.04)

I have a python program that I would like to automatically run after logging in. This shouldn't be much of a problem, however, I would like the terminal to be in fullscreen mode while running the ...
0
votes
2answers
28 views

execute a file having some terminal commands [duplicate]

I want to create a file which contains some commands (suppose 4 commands) such that when I click on that file, the commands will executed in terminal. Is it possible ? I am using Ubuntu 14.04 LTS. ...
1
vote
1answer
20 views

How could one export from a sourced script only specific functions

I try to expose from a script only specific functions. For example, let's say I have the script hello_world.sh and it has 2 functions, hello and world: ## hello_world.sh - name of the file, not the ...
0
votes
0answers
44 views

Gammu runonreceive doesn't pass variable

i want to configure my Rapsberry as a SMS Ping Pong Player. So i installed gammu-smsd and configured the gammu-smsdrc as follows: # Configuration file for Gammu SMS Daemon # Gammu library ...
0
votes
0answers
31 views

How to setup selendroid in ubuntu 14.04? Cannot execute selendroid script. ANDROID_HOME not found error shown in eclipse console

I'm trying to set up selendroid in ubuntu for mobile app testing purposes. First I installed JAVA from ubuntu software center. Then I installed android SDK and I've set path in .bashrc as follows: ...
-1
votes
2answers
54 views

bash send output from command to variable

I am trying someting very easy, I have seen some answer, but they do not work I am trying to send the output of ls-al to a variable some code before this line if [[ $ans == "L"* ]];then text=...
-1
votes
1answer
63 views

Complex Number and String comparison

In a bash script the user enters an 8-digit number after being prompted for input. echo "Enter an 8-digit number." read NUM After this a function is executed that generates a single-digit random ...
1
vote
1answer
32 views

How do I zip up multiple files on command line?

Forgive this most basic question, but I couldn't find a direct answer or simple example on stack exchange. Let's say I have a folder of files that I would like to compress into one zip file that I ...
0
votes
1answer
24 views

What is happening with stdout inside function?

If I run the following command I get the expected output as shown. jonathan@Aristotle:~/EclipseWorkspaces/AGI/ShellUtilities$ df --output=fstype,source $(pwd) Type Filesystem ext4 /dev/sdb1 If I ...
1
vote
1answer
144 views

Running a bash script from an xsession to toggle startup programs

So I've got an interesting challenge in front of me, running Ubuntu 16.04. I originally created a .xsession file that ran Exec=google-chrome --kiosk http://some-url.com to boot as a kiosk device. ...
2
votes
1answer
30 views

terminal appears on hotkey but command not executed

Me being the lazy bum that I am, wanted to make youtube-dl (the script that downloads youtube videos) execute upon pressing a hotkey for the current link in clipboard. In my keyboard shortcuts i made: ...
0
votes
0answers
36 views

Run interactive script on each users first login, whether on SSH, virtual terminal, or GUI

I have an interactive script that I need to run whenever a user logs into a system for the very first time. It uses read to gather some user specific information required for the first-time ...
0
votes
0answers
30 views

Guide to using trayer?

I am trying to use trayer through command line and I don't understand how to add items onto the actual tray. I am trying to add brightness indicator next to the wifi symbol so i can easily adjust my ...
0
votes
1answer
32 views

bash storing array variables in rotation

My objective is store values in array , as below: arr[0]=apple arr[1]=banana arr[2]=orange arr[3]=grapes arr[4]=apple arr[5]=banana arr[6]=orange arr[7]=grapes arr[8]=apple arr[9]=banana I can ...
0
votes
0answers
39 views

redirect scientific paper to sci-hub datebase by shell script with keyboard

i usually read paper ; so as i can't buy all of them, i download some of them from sci-hub.cc website, for this action you could append sci-hub.cc to website's paper and you can get PDF from that ...
0
votes
0answers
26 views

Show graphical notification from systemd trigger

I have created a systemd service like this: [Unit] Description=My device name backup Requires=media-my-device-name.mount After=media-my-device-name.mount [Service] Environment=DISPLAY=:0 User=...
0
votes
1answer
18 views

“bash: ./cents: no such file exist or directory” while trying to run a program that has already been compiled

Can someone explain to me why this happens? It compiles the program fine but it wont let me run it. I'm on ubuntu 16.04 Bonus question: How can I run the math library on Geany? I love the interface ...
4
votes
1answer
300 views

Set bash as default shell with option to enter into fish

I've seen a few questions as to how to enter into bash while fish is the default shell. I actually want to do the opposite. I currently have fish as my default shell, but would like to return to bash ...
1
vote
0answers
67 views

Port Ubuntu Touch using Windows 10 ubuntu bash

I'm trying to port Ubuntu Touch to my phone using Windows 10 bash. After many try, i stuck on building the test image for Nexus 4 to check possible it's or not. And every time after starting building: ...
0
votes
1answer
28 views

Why does not pipe work with 'find' and 'ls'

Why does not pipe work with 'find' and 'ls' If I do find . -name *foo* | ls -lah , it does a ls on $PWD and not the output of find. The solution however is find . -name *foo* | xargs -r ls -alh or ...
0
votes
0answers
19 views

Does Ubuntu handle 'bash_profile' differently from OS X in subshells? [duplicate]

On my OS X system, when I use a subshell (for example with screen), the settings in my .bash_profile are inherited, but on Ubuntu, they are not, and in order to get the same behavior I have on OS X I ...
0
votes
0answers
33 views

How to create non-root user alias?

I know that I can add an alias by editing .bashrc for root user but I need to know a way to do the same thing for a non-root user. I would like to use this kind of alias in a script that I have set as ...
6
votes
3answers
787 views

A script for copying random folders

I'd like to realize a little project I've always had in mind. I have a vast music library on my desktop and I'm looking for a way/script to select a random amount of folders (say, 25 albums) and, if ...
1
vote
0answers
44 views

notify-send not showing popup message

I have a script which executes on certain conditions, whenever I manually execute the script, the popup appears, however if i try to aumotate the script(i.e. run the script right after system is ...
0
votes
1answer
51 views

SSH fails in Crontab after reboot

I am regularly running a shell script through Crontab that uses SSH to connect to a server. If I run that script manually it runs through successfully. Within the same session Crontab will ...
0
votes
0answers
23 views

Script of getting mysql user grant details

I am trying to get mysql user grant details and echo it to out file hari=mysql -sN -e "show grants for mysqladm"; echo $hari GRANT ALL PRIVILEGES ON prod_server_list.txt stage_server_list.txt ...
1
vote
1answer
59 views

Can't make bash default shell

I installed ZSH and didn't like it and I want to revert back to bash. I uninstalled ZSH before I tried changing the default shell. I uninstalled ZSH and then ran the commands chsh and sudo chsh --...
1
vote
1answer
31 views

start script after resume as logged in user (not root)

I'm running owncloud client in Ubuntu and after a suspend/resume there's a bug in owncloud which makes it not be able to connect to the server. I wrote a little script which should restart owncloud, ...
0
votes
1answer
48 views

Script not running on resume/wakeup in Ubuntu

I have a script named 999_thaw_flash.sh in my /etc/pm/sleep.d The script follows like this :- export DISPLAY=:0 #!/bin/bash case "{$1}" in resume|thaw) lynx --dump link1 >> file1 lynx --...
1
vote
1answer
70 views

How can I make bash completion (tab auto-complete) match a particular command first?

I develop using Python on Ubuntu and so I use the workon command (from virtualenvwrapper) a lot to switch virtualenvs. Previously, workon was the first tab-completion match for "wo", so I could type ...
0
votes
0answers
59 views

Bash Script Not Working

I hope this is an easy answer Problems: I placed the following bash script called learn-address.sh in the following folder: vi /etc/openvpn/netem/learn-address.sh Added the following two lines to ...
1
vote
0answers
15 views

Open Terminal Shows : bash: alias: =: not found How to remove? [duplicate]

when i open my terminal it shows: bash: alias: osmall: not found bash: alias: =: not found bash: alias: cd: not found bash: alias: /var/www/html/OpenSupermall/: not found bash: alias: /var/www/html/...
0
votes
0answers
70 views

I have a problem with a loop in a script. How I can create a loop in a loop?

I'm doing a script for improving my scripting capacities, but I can't make a loop work, how I can fix it? Here's the script: As far as my knowledge go, the problem is in the below script: read op2; ...
1
vote
3answers
48 views

Rearrange the components of filenames for a group of files

I have a group of photo files that are named: ddmmyyyyxxxx.jpg (xxxx is just a sequence number) that I am trying to search but sadly no results, is to rename the filename to yyyy-mm-dd-xxxx.jpg. All ...