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

learn more… | top users | synonyms (1)

0
votes
1answer
226 views

run ap-hotspot commands from a saved file

How can I create a text file to automatically run these commands: sudo ap-hotspot start sudo ap-hotspot configure sudo ap-hotspot stop sudo ap-hotspot restart One file for each command. I tried ...
1
vote
3answers
593 views

How do I get my shell script to automatically accept prompts?

I made a simple shell script (that I run as root) to download essential apps that I might need whenever I reinstall ubuntu: It looks like this: apt-get install docky && apt-get install geany ...
3
votes
1answer
246 views

Why does hitting Control + C when in an application launched from a script, break the script?

To jump straight in: while true; do #--- MENU LOGIC HERE, stick response in $MENUEXIT #----Deal with responses here if [ $S1 == $MENUEXIT ]; then tail -f /path-to-file ...
0
votes
4answers
703 views

Running {command vs through bash script} + redirect output

I am not sure if it is one or two issues here: file /usr/bin/line1 wine /home/aiao/.wine/drive_c/Program\ Files\ \(x86\)/LINE/Line.exe > /dev/null 2>&1 file /usr/bin/line2 ...
-3
votes
1answer
12k views

-gt: unary operator expected error on bash

this is simple script i = "1"; b = "4"; if [ "$i"-gt "$b" ] then echo "" fi why I got [: -gt: unary operator expected what is wong ?
0
votes
1answer
140 views

Use alias inside a script

One of the software tools I'm using requires "sh" to be a symlink to "bash" instead of "dash". Since I don't want to change the default shell to bash for the whole system and I can't change the tool ...
1
vote
1answer
54 views

Looping in bash from Makefile

i need to write a Makefile that compiles each .cpp in current directory in .so file (with flags -shared -fPIC) and copyies .so file into "../../dir/" directory without ".so" extension. For example, ...
1
vote
1answer
457 views

Changes to $PATH won't save after closing the terminal session [duplicate]

I downloaded the latest version of Scala and saved it to /opt folder. Then I tried to add /opt/scala-2.11.2/bin to the PATH in order to have easier access to commands like scala and scalac. After ...
1
vote
1answer
3k views

What causes “bash: /bin: Is a directory” every time a terminal is opened? [closed]

This is initial screen I am getting on Ubuntu 12.04, when I open a terminal (Ctrl+Alt+T): That is, the text on the terminal is: bash: /bin: Is a directory chase@chase-desktop:~$ gedit ~/.bashrc ...
4
votes
2answers
424 views

Shell gives no prompt if auto completion is enabled (blinking cursor instead)

I tryed to enable shell autocompletion uncommenting the following lines in my .bashrc: # enable programmable completion features (you don't need to enable # this, if it's already enabled in ...
1
vote
2answers
4k views

bash: ./configure: No such file or directory while installing FFMPEG

I am trying to install FFMPEG in Ubuntu 14.04. I got help to install FFMPEG installation In meanwhile I got an error `bash: ./configure: No such file or directory` I am getting this error when I ...
1
vote
1answer
261 views

Can I use a Bash variable in a sed command?

I'm trying to execute a sed command with "-n" option. for i in 1 2 3 4 5 ; do maas maas nodes list | grep hostname | cut -d\" -f4 | sed -n '$ip'; done I want it to run sed -n '1p' then sed -n '2p' ...
0
votes
1answer
131 views

error: must set personality to get -x option

Why this command works: ps -ax | grep mongo but when I try set it to variable: ubuntu# command='ps -ax | grep mongo' ubuntu# echo $command ps -ax | grep mongo It gives me error, when calling: ...
5
votes
2answers
452 views

How to easily make an alias command permanent? [duplicate]

I search everywhere and almost everyone was suggesting to open the ~/.bashrc or ~/.bash_aliases, then put the alias command there, I created a function name palias as permanent alias function and put ...
2
votes
0answers
39 views

How can I run a simple rsync shell script at boot with root? [duplicate]

I have a shell script that contains a single rsync command to rsync two local directories. I want the script to run at startup/during boot and I can't seem to find the solution for this problem. ...
3
votes
2answers
3k views

Why I obtain this error when I try to perform this simple bash script?

I am following this tutorial to correctly execute Aptana Studio on my Ubuntu 14.04: Command menu in aptana studio 3 is not working in ubuntu 14.04 So I have installed the Oracle JRE and finnally I ...
0
votes
1answer
63 views

is it possible that i deleted my files while trying to delete a symbolic link?

I made a symbolic link that points to a 500gb ntfs drive, when i executed the second command it halted for 3 seconds so i terminated it, i have a lot of files on the drive im not sure if it deleted ...
-1
votes
3answers
5k views

How to give all the users(except guest) permissions to particular directory via terminal?

I want every user to have full permissions over a single directory(and all the contents). Is this possible, and how? Thanks.
1
vote
3answers
197 views

ways of calculating required disk space prior to package download

The following is no duplicate of How to determine the size of a package while using apt prior to downloading?, it is more an additional question. Consider the following two implementations to get the ...
2
votes
1answer
338 views

Bash script using `sudo` runs correctly from cli but not when clicked to run

I am trying to get a simple bash script to run when I click on it. It runs perfectly from the cli but starting motion with sudo fails to start. I have that script setup with sudoers already for ...
4
votes
3answers
2k views

What version of Google Chrome do I have?

How can I find out what version of chrome I am using? I would like a command line method, not the GUI - visiting chrome://chrome in the url bar. I need to be able to use it in a bash script. I ran ...
229
votes
12answers
366k views

How to get bash or ssh into a running container in background mode?

I want to ssh or bash into a running docker container. Please, see example: $ sudo docker run -d webserver webserver is clean image from ubuntu:14.04 $ sudo docker ps CONTAINER ID IMAGE ...
1
vote
1answer
490 views

Bash script to convert multiple avi in to mp4

I have a lot of avi files in one folder and trying to convert them in to mp4. I am using this bash script not sure whats wrong. any idea? #!/bin/bash for i in *.avi; do name=`echo $i | cut -d'.' ...
-1
votes
1answer
429 views

bash variable array names and getting values

As you see , i have situation to read values in different arrays, like array1 , array 2 , array3 etc. and I need to print values array1[0], array2[1], like this. I can do it individually like this ...
3
votes
1answer
152 views

How to periodically back up a folder on change?

I want to achieve the following functionality in ubuntu but I dont know how to do it. I need a daemon that periodically backs up a directory, say dir to another location by doing the following: ...
0
votes
1answer
42 views

How do I revert updates to get to a usable GUI

I've been using 14.04 for a while and everything seems running smooth,until last night I downloaded updates.Afterwards I restarted and a message like a reminder or new email type message popped up ...
1
vote
1answer
165 views

Writing a script to rsync all directories

I have a huge set of backup files, each containing a directory of Videos. Each video directory is slightly different. I would like to merge these into a single directory to conserve, as I don't ...
0
votes
1answer
2k views

Maven only invokable from terminal while root

I'm following the directions laid out here: http://java.dzone.com/articles/installing-maven-304-ubuntu Everything is in the right place and the sym link is working correctly. However whenever I try ...
10
votes
3answers
18k views

Error message 'source: not found' when running a script

I am creating a little automated setup script that will modify /etc/profile and $HOME/.profile if some paths are not exported. Then, I'd like to reload these automatically. I have read that source ...
3
votes
1answer
499 views

Cron job not working properly on start up

Thanks for reading this. I have created a bash script to backup my databases. The script will create a directory for the day then create a backup file for each database within that directory. It ...
1
vote
2answers
749 views

bash script to back up file [closed]

I have a few files to be backed up. I need a script to check line number of a file and if it exceeds, say 8000 lines, it will simply zip it and name it with date prefix format. I need your help.
-1
votes
2answers
74 views

Problem running the script in .sh file

I want to execute below script rm -rf /home/apps/temp export DAA_HOME=/home/apps/Tools/3.6/eclipse export BuildFile=/home/apps/Tools/Automated/BuildFile alias Studio_Home=$DAA_HOME rm -f ...
0
votes
1answer
841 views

return value from awk

This is mybashfile.sh file . . . awk -f myawkfile.awk mytracefile.tr . . . Now I want to return one parameter from myawkfile.awk to the current mybashfile.sh. Is there any way to return a value ...
13
votes
3answers
6k views

How can I set a single .bashrc file for several users?

during my work I need to constantly add alias commands to bashrc, most of those commands needs to be runed by other users. is there any way I could add alias commands to a bashrc from external source? ...
0
votes
1answer
1k views

How to launch interactive shell script in bash hourly with cron?

I put this line in the crontab: 1 * * * * DISPLAY=:0.0 /usr/bin/gnome-terminal -e /home/user/Desktop/mltpl The script is executable. If paste that command in the terminal--that is, the string ...
2
votes
1answer
6k views

libomniORB4.so.1: wrong ELF class: ELFCLASS64 [closed]

I'm running a bash script and it gives the following error. Anyone has any idea how to sort this out? error while loading shared libraries: libomniORB4.so.1: wrong ELF class: ELFCLASS64
8
votes
3answers
12k views

Ubuntu 14.04 not running Bash scripts in /etc/cron.daily [duplicate]

I have a few scripts (that currently run in a CentOS system) I have moved to a new Ubuntu 14.04 system. These scripts are in the /etc/cron.daily to run once a day. These scripts are to run at the ...
0
votes
3answers
53 views

Disable and enable certain websites automatically

As some sites like facebook are distracting to me, I have decited to edit /etc/hosts file in order to block (temporarily) those sites as an extra way to avoid these sites. As an example, my hosts file ...
0
votes
1answer
547 views

Can't install HoNClient-3.4.3.sh

I'm desktop user. My OS running 32-bit Ubuntu 14.04LTS. The problem I've run into is this: When I try to run the client in the terminal, using the command: sudo sh HoNClient-3.4.3.sh it gives me ...
1
vote
1answer
204 views

Unique id for combination of Latitude - Longitude

I am new in using Linux (kubuntu 13). I have a LibreOffice Calc table containing one column with Latitude and one with Longitude. What I want to do is for every unique combination of Latitude and ...
0
votes
3answers
2k views

How to run a Phantomjs server with an upstart script?

I have phantomjs installed and I want to run a phantom server whenever the (Ubuntu) server starts. I am currently working locally on Ubuntu 14.04, and the server this will be deployed to is also ...
0
votes
6answers
87 views

bash prompt chenged itself to a plain “#”

Until I logged in today, as usual- my bash prompt was the standard "username@currpath # ". But today, for me, it's just "# ". If I login as root, it is normal. bashrc seems fine (as compared to ...
0
votes
1answer
59 views

Create a clickable install script for software

I want to create a simple script that a user can download, click on, and it will: request their root password through some sort of pop-up interface then sudo apt-get install a package to their ...
2
votes
1answer
11k views

Permanent PATH variable

How will I make this /media/De Soft/mongodb/bin PATH variable permanent? Everyone is saying export PATH=$PATH:media/De\ Soft/mongodb/bin to your ~/.profile, or .bashrc, or .zshenv depending on your ...
2
votes
1answer
3k views

Cron job not running - postfix/sendmail error

Here is my content of sudo crontab -e @hourly /home/userName/ntpdate.sh The content of my script (ntpdate.sh) //.25 is my ntp server echo "Current time is $(date), " >> ...
1
vote
1answer
241 views

Disable 'ESC' and 'Shift + Tab' history shortcuts in terminal

When in a bash terminal, if I hit ESC or Shift + Tab the command line goes to the history where I can move around to previous bash commands with vi-like bindings. I get messed up when in this mode ...
4
votes
3answers
4k views

Opening multiple terminal tabs and running command

I need to open multiple terminal tabs, give them titles, go to a directory, and make each tab run a command. I am new to Linux and shell scripting, after searching online and checking some solutions, ...
0
votes
2answers
568 views

Running a .sh from a .desktop [Making an icon for Minecraft.]

Rather recently, I've decided to add minecraft to my dock. I play it enough to want it on my dock. I created a .desktop file, and I gave it an icon, name, and such. I figured that point the exec at ...
1
vote
2answers
2k views

Running a .sh to execute multiple commands

I was curious how I would go about running multiple commands via shell script. For example, just to try it out, I'd like to be able to connect a .desktop to a .sh that will run all the update codes ...
0
votes
2answers
678 views

How to auto restart a command after it closes down?

I am using rtmpdump to restream live video on my local network on nginx rtmp server. like this: sudo rtmpdump -r "rtmp://123.45.6.7/live/" -a "live/" -f "LNX 14,0,0,125" -W ...