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

learn more… | top users | synonyms (1)

0
votes
0answers
11 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 ...
-1
votes
1answer
77 views

How To Run A Shell Script Again And Again Having X Interval Of Time? [duplicate]

I have a shell script in my Ubuntu Server 14.04 LTS at ./ShellScript.sh. I setup /etc/rc.local to run the shell script after boot but before login using below code. Run this: sudo nano /etc/rc.local ...
1
vote
2answers
27 views

Git prompt won't colorize

I want my git prompt in bash to colorize (green for clean repos, red for dirty repos). Right now, it shows plain white text no matter the git state of my cwd/repo. ...
4
votes
2answers
87 views
+100

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 ...
0
votes
3answers
45 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 ...
0
votes
1answer
19 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
25 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
25 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 ...
4
votes
2answers
57 views

How to write a portable shell script with error handling

I have had relatively good success at writing portable, full-featured shell shell scripts by using /bin/sh, for example: #!/bin/sh trap 'echo "Error on line $LINENO"; exit 1' ERR while read LINE do ...
3
votes
1answer
136 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 ...
11
votes
5answers
4k views

What does >> or double Angle brackets mean? [duplicate]

It seems like such a simple questions but I cant find any resource regarding it In C/C++ , it means to store the read in a value from command prompt and store it inside a variable , How about in ...
2
votes
1answer
30 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
14 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
30 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
49 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 ...
0
votes
2answers
17 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
2answers
28 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
1answer
29 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 ...
1
vote
1answer
19 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
4answers
1k views

ping multiple IP's using bash?

I have 10 IP numbers which I have to ping daily for checking , How I can do that by using BASH script. So that I can automate that task by using cron. I want BASH script only. Thank you.
0
votes
0answers
13 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 ...
10
votes
4answers
1k views

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

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 ...
2
votes
1answer
33 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
162 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.
7
votes
3answers
13k views

I can't find .bash_profile

I am trying to learn how to tweak my shell in the file but can't seems to find the file in my home directory or in /etc/profile. Is there any other file I need to search for, or am I expected to ...
2
votes
3answers
283 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 ...
0
votes
0answers
7 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
31 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 ...
8
votes
2answers
1k views

What does the first '.' do in . ~/.bashrc? [duplicate]

I saw a post about fix your alias in .bashrc. And he says after you put your alias in .bashrc , you need to use: . ~/.bashrc I do not quite understand what the first dot(' . ') does here. What's ...
0
votes
2answers
30 views

How do I set environment variables through a keyboard shortcut?

I have a script that increments an environment variable, but it only works if I run it by perpending it with "source" or with a ".". Unfortunately, this means that if I attempt to bind it to a key, I ...
25
votes
2answers
12k views

How can I tell if my system was booted as EFI/UEFI or BIOS?

How do I determine whether a particular running Ubuntu system was booted using EFI/UEFI, or BIOS?
0
votes
0answers
7 views

Console Mode VIM 256 Color Support

This question is about using the console mode (i.e. ctrl+alt+f1) and not about using a terminal emulator. When running from a terminal emulator, my VIM uses 256 colors without a problem. I've tried a ...
0
votes
1answer
18 views

How to configure a window setup with a script?

I would like to know if there is any way to execute an script and get a window setup where several programs are executed and positioned in certain points of the desktop with some desired dimensions. ...
2
votes
1answer
38 views

script in bash not understood using terminal in Ubuntu 12.04 [closed]

Can anyone tells me what does this script means found in a .sh file:: [ ! -n "$T_R" ] && echo "Message Appear" && exit 1;
0
votes
1answer
16 views

Why do I get failed to execute child process?

So, I have a .sh file on my desktop, and I want to run it in the terminal. The first line is #! /bin/bash , then a blank line, then my command. I choose Run in terminal when I double click it, and ...
0
votes
1answer
21 views

variable.sh is not exporting the variable using terminal

I want to export many paths using a .sh script. after running it nothing is exported I don't know why. so if anyone can advise. This is the script used: #!/bin/bash txtrst=$(tput sgr0) # Text reset ...
1
vote
1answer
25 views

Declare a variable when running the script bash

How to declare the variable content when running the script? I know that is possible to use $1 $2 $3 to set a variable when running the script ./script.sh this is sparta, but I did not found a way to ...
1
vote
3answers
37 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 ...
0
votes
2answers
26 views

Why doesn't this second nohup command run?

Everything runs except the last line: #!/bin/bash xinput set-prop 11 "Device Accel Profile" -1 xinput set-prop 11 "Device Accel Velocity Scaling" 1 xinput set-prop 11 "Device Accel Constant ...
0
votes
0answers
17 views

How to build .deb package for ubutnu [duplicate]

I have written some shell scripts.I want to pack them in a debian package to be used for ubuntu.So I need to know how to build a debian binary package.Please tell me the proper steps to be followed ...
0
votes
0answers
21 views

Permissions when running second level script

Evening Everyone, I have 1 bash script that starts the program Motion (some may be familiar with). Motion links to a script in the motion.conf upon picture save or file save to a perl script that ...
0
votes
1answer
34 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
0answers
20 views

how to detect the encoding of a file? [duplicate]

I have subtitles files, .srt i want a quick way to detect their encoding so i can tell devede what is their encoding so it can burn them correctly it would be nice to have a recursive script that ...
0
votes
4answers
47 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 ...
0
votes
1answer
23 views

deb package has no usr/lib after installation

I'm building a simple single binary deb package, everything works fine with the executable that is placed in the usr/bin folder and executes when I click the desktop icon. Now I want to start ...
0
votes
1answer
26 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 ...
0
votes
2answers
27 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 ...
-2
votes
1answer
40 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 ?
4
votes
3answers
299 views

Bash one-liner to delete only old kernels

I've seen lots of threads on how to free space on the /boot partition and that is my objective as well. However, I'm only interested in deleting old kernels and not each one of them but the current ...
0
votes
1answer
26 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 ...