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

learn more… | top users | synonyms (1)

0
votes
1answer
7 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?
1
vote
0answers
6 views

Juju Charm issue

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
11 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
20 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
15 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 ...
9
votes
2answers
63 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
56 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
22 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
26 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
32 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
142 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 ...
0
votes
3answers
53 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
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
16 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
37 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
54 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
29 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
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
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
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 ...
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 ...
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
165 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
0answers
8 views
+50

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 ...
2
votes
3answers
285 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 ...
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 ...
0
votes
0answers
9 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 ...
4
votes
2answers
58 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 ...
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
39 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
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 ...
0
votes
1answer
17 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 ...
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 ...
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 ...
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
0answers
21 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
2answers
30 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
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
29 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
28 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 ...
0
votes
1answer
35 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
49 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 ...
-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 ?
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 ...
1
vote
1answer
25 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
21 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 ...
0
votes
1answer
43 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
109 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 ...