Tagged Questions

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

learn more… | top users | synonyms (1)

1
vote
1answer
116 views

How to disable notifications sound while XBMC is runnig?

I would like to know if it's possible to disable notification using XBMC (mails, network etc). I'm using Kubuntu 14.04.1. I've found this command but the script doesn't work, the sound is re-enabled ...
2
votes
0answers
123 views

Slow bash tab completion

My bash shell's tab completion is very slow, usually taking 1-2 seconds per completion. This only seems to happen when I'm using my laptop from work. Tab completion is very speedy when using my laptop ...
0
votes
1answer
39 views

Simple bash script not working

I'm pretty new to bash scripting. I'm trying to make a script to export the http_proxy variables. This is what I do from the terminal: $export http_proxy=http://proxy21.iitd.ernet.in:3128/ $export ...
-1
votes
1answer
168 views

run bash script from another script and redirect its output

Hi everyone I have to do a program.. I'll be really concise to explain it... And hat I've already done and what i have to do... Simply, I have to do a "simulator" in Bash that run exercises of ...
0
votes
2answers
36 views

End script and restart it with the same options and arguments

Usually !! repeats the last given command. But it doesn’t seem to work in a bash script. Is there a way to end a script and repeat it with the exact same options and arguments given the last time? ...
0
votes
1answer
38 views

problem occuring while creating .exe file

I'm trying to run test problem in the mfix but got struck with an error sh: 0: Can't open ../../model/make_mfix. bhaskar@admin2-Precision-T7600:~/mfix/run/tests/Added_Mass$ sh ../../model/make_mfix ...
0
votes
1answer
156 views

Run terminal command (python command) at start up [duplicate]

New to Ubuntu, but have looked everywhere to get this question answered. Found no solution so far. Basically I need to run two terminal commands on startup, which follow each other directly. This will ...
0
votes
1answer
27 views

Same program, different version, in different locations…how to specify which to use?

Hi all I'm trying to run a program called cufflinks on my machine, however there appears to be a version of this in multiple places on my existing system. For example when I typed whereis cufflinks ...
0
votes
1answer
159 views

Home files and folders permissions could not be determined

I was trying to create a default configuration file for activemq with the command sudo ./activemq setup [ /etc/default/activemq | /home/leo/.activemqrc ]` Then recieved this message: INFO: ...
1
vote
0answers
67 views

How do I open an URL from a bash script?

I have a simple script to start a node.js webserver and open the URL in a browser. However the last part doesn't seem to work, it wont open the URL in a browser (or anywhere else). This is the code I ...
5
votes
5answers
1k views

How to compare two files

So basically what I want to do is compare two file by line by column 2. How could I accomplish this? File_1.txt: User1 US User2 US User3 US File_2.txt: User1 US User2 US User3 NG Output_File: ...
0
votes
0answers
29 views

How to rename various file extension into an extension [duplicate]

I have many files in a directory with various extension (files.txt, files.html, files.jpg, etc). I need to change all the extension of these files into an extension (files.ext.backup). So, I will ...
3
votes
1answer
440 views

Terminal flashing between current and previous screen

I just upgraded from Ubuntu 12.04 to 14.04. After upgrading the terminal will sometimes, but not always, flash between the current screen and the previous screen. Here are some examples: The output ...
0
votes
0answers
103 views

Terminal closing itself after 14.04 upgrade

All was fine in 12.04, in this case I'm using virtualbox in Windows. The upgrading process ran ok, no errors, no warnings. After rebooting the errors started to happen. Just after booting up there ...
0
votes
0answers
83 views

no such package beginner tutorials

I'm using Hydro. I am new to this. I was reading the book "A Gentle Intro to ROS" by Jason M. O'Kane. I got up to the section "Creating a package". I was following the "create a workspace" and ...
0
votes
1answer
24 views

Backup function

I am attempting to make a function that you provide it a file name, it then make a back up of the file and slaps on a time stamp to mark the file. Once it time stamps the file it prints out all files ...
0
votes
2answers
25 views

How can I make DNSMASQ bindings in human readable format?

I want to setup an alias or a script that will allow me show the DHCP bindings dnsmasq has. $ cat /var/lib/misc/dnsmasq.leases 1411349054 08:11:96:e9:52:ec 192.168.1.96 W11837894 * 1411413528 ...
0
votes
1answer
1k views

when building u-boot /bin/bash: arm-none-linux-gnueabi-gcc: command not found

I am currently running Ubuntu 12.0.4 on a 64 bit machine. I have an AM335X development board. Along with the kit came the compressed kernel (linux 3,2), rootfs, u-boot, and ARM cross compiler ...
0
votes
1answer
33 views

bashrc script not accepting space in directory name

I have added a variable at the end of my ~/.basrc file : export xyz = /home/faizal/DEV/ADT workspace/xyz But if i open a new terminal, i get the error : bash: export: 'workspace/xyz': not a valid ...
1
vote
1answer
47 views

Make password appear censored in bash script

I am going to make this short and simple. I am making a bash script where the user needs to enter their root password using the read command and it will be stored in a variable. What I don't like is ...
2
votes
2answers
74 views

What is wrong with this script?

So I got this script from this guide: www.tldp.org/LDP/abs/abs-guide.pdf LOG_DIR=/var/log ROOT_UID=0 LINES=50 E_XCD=86 E_NOTROOT=87 if [ "$UID" != "$ROOT_UID" ] then echo "Must be root to run this ...
13
votes
4answers
2k views

What does /dev/null mean in a shell script?

I've started learning bash scripting by using this guide: http://www.tldp.org/LDP/abs/abs-guide.pdf However I got stuck at the first script: cd /var/log cat /dev/null > messages cat /dev/null ...
1
vote
1answer
55 views

How to find a Window which should be visible on Ubuntu 14.04

In Ubuntu 14.04 I have Keepass2 in my Launchbar. I do execute Keepass and I can see it is executing by a small arrow. With statement : ps - fu bernard | grep keepass2 results into : bernard 2433 ...
0
votes
1answer
20 views

File Mod Date in ISO?

I want to return a file modification date in a BASH script, in ISO format (YYYY-MM-DD) What shell command will get the modification timestamp, similar to how filemtime does in PHP?
2
votes
3answers
57 views

How do I manage changing users in a charm?

I'm writing a charm in which I need to change user to install some packages. When I start juju-deploy all this running as root... So, I try to change my user and is not possible. If anyone has any ...
0
votes
1answer
221 views

Running a .bash file in Eclipse

I know this is really an Eclipse issue but I can't seem to login in their forum. I am running eclipse juno for some c/c++ development.However, I wrote a .bash script that initiate the entire ...
1
vote
1answer
32 views

Bash searches for inexistent directories upon opening terminal

I tried to install IRAF a couple weeks ago but I couldn't get it to work so I ended up uninstalling the whole thing. Ever since, whenever I open my terminal I get this: bash: ...
0
votes
0answers
33 views

disable all hotkeys with dconf-editor

I'm building a deb package that will create a kiosk user account. When you login to this account, the browser automatically starts and navigates to a pre-given website. Also all the hotkeys should be ...
18
votes
3answers
370 views

What is the $BASH_COMMAND variable good for?

According to the Bash manual, the environment variable BASH_COMMAND contains The command currently being executed or about to be executed, unless the shell is executing a command as the result of ...
3
votes
1answer
83 views

Is there a way to mirror directory changes in Terminator?

I'm on Ubuntu 12.04 and am using Terminator as my primary terminal. I like it because it lets me keep a python interpreter and bash terminal open at the same time, in the same view. What is annoying ...
0
votes
1answer
70 views

how to concatenate two strings in shell script in 3.13.0-34-generic kernel

I want to concatenate two strings for the shell file im getting error when i have created the shell file in following manner could you please suggest how to get it set export ...
0
votes
2answers
36 views

Why the same .sh does not work with 2 different users executing it?

I have rwo users User1 and User2. I have this script1.sh inside User2 home folder: #!/bin/bash cd /home/user1 && ./script2.sh that calls script2.sh: #!/bin/bash if [ 2 > 1 ]; then ...
1
vote
1answer
352 views

How to install Firefox Aurora from a terminal?

I want to install Firefox Aurora in Ubuntu 14.04 from the terminal (I know there are other ways) but I can't. I've downloaded firefox-33.0a2.ca.linux-i686.tar.bz2 (linked from the download page) and ...
3
votes
1answer
626 views

exclude certain files in ls

I would like to run ls and exclude certain files in the output. When I run the following command, I get all files with each on one line: $ ls -1 file1 file2 file3 temp I would like to run this ...
1
vote
3answers
109 views

How do I list all available shell builtin commands?

We know bash supports number of buitin commands like: $ type type cd help command type is a shell builtin cd is a shell builtin help is a shell builtin command is a shell builtin I want to get ...
2
votes
1answer
44 views

How to run a command without keyboard? [duplicate]

I am wondering if it is possible to run a command without keyboard. Actually, I would like to run dmesg and save the output into a text file. I have written previously a bash script which does the ...
0
votes
1answer
194 views

Hardcoding subtitles using mkvmerge recursivly

I have 24 season 9, the folder has episodes and arabic subtitles. I want to automate the hardcoding of the subtitles subtitles using a script. it looks like so 24.903.hdtv-lol.mp4 and ...
0
votes
1answer
116 views

Alias to open multiple text files in different directories from terminal

After hours of searching and trying different gedit plugins I did not manage to add a session saver to gedit to open some files in Ubuntu 14.04 (see here). So, I am trying to create a permanent ...
2
votes
2answers
102 views

.sh file on Startup Applications isn't executed

This is a followup to a question about dialog boxes. I want to show a dialog box both at the start of a session, and after n minutes of inactivity. I have decided to use zenity and xautolock. I have ...
1
vote
2answers
41 views

Do higher level scripting languages use shell scripts to work?

I'm just learning about bash and when I saw that bash uses 'echo' I tried to search for the relationship between PHP and bash and it seems like people are building programs were bash script and PHP ...
0
votes
2answers
20 views

Can't figure out JOIN command

I have two files and I'm trying to join them at a certain spot. I'd like to join them at the fourth column of the second file using the first column of the first. It's driving me nuts! Here is what ...
1
vote
1answer
34 views

Command is available as user, but not sudo?

I am in the process of building gendev, a sega genesis development environment and I am running into an interesting problem. When I try to install via "sudo make install" I get an error stating that ...
0
votes
0answers
16 views

How do I send a notification into blue-envelope area from bash?

I want to send a notification that would be permanently visible, e.g. so I won't miss it. Ideally this would be a MacOS-like popping GUI icon in Dock, but as I understand, such a notification in ...
0
votes
1answer
63 views

Tell me where is mistake in anacron task?

I have tried to make this task for abacron: dm@dm-system:~$ cat /etc/anacrontab # /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh ...
2
votes
2answers
129 views

bash utility 'dialog' leaves a messy screen

When I run this script it displays options in a menu style on my terminal and then runs the relavent command in the script. #!/bin/sh TEMP=/tmp/answer$$ dialog --ascii-lines --title "Administrative ...
2
votes
3answers
2k views

I can not find .bash_profile in ubuntu

I can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I use ls -a command to see the .bash_profile, but there isn't such a file.
1
vote
1answer
53 views

can't make juju charm-store server?

I am trying to run juju charm-server in my local machine.I followed these steps.(https://github.com/juju/charmstore) but it gives this error.When i enter make command it gives this one. Makefile:49: ...
0
votes
1answer
93 views

Complicated script involving command line and XFCE Terminal

I run Ubuntu 14.04 and installed the XFCE Terminal for some reason, and what I want to do is make a script to go to a folder on my hard drive under /Server/Gen2 and run several .sh scripts in ...
2
votes
3answers
857 views

Trouble using cd command with “~” or “$HOME” in bash scripting

We know that ~ and $HOME refer to the home directory of the current user. (For me echo ~=echo $HOME=pandya). But I can't use it in bash scripting. Here is a simple example script: #!/bin/bash echo ...
12
votes
2answers
2k views

Making my first bash script, can't get the cd command to 'stick.' [duplicate]

For my first bash script, I want to create something that's really been annoying me: when I switch folders, I want the contents of that folder to be displated automatically. I tried adding this ...