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

learn more… | top users | synonyms (1)

1
vote
2answers
66 views

Changing environment variables

I just changed my /etc/environment file to: M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1 M2=$M2_HOME/bin ...
1
vote
2answers
63 views

How to get a colored bash?

How to get the bash colored like this?
-1
votes
2answers
42 views

in a file match a stringa and print lines matching another stringb

Basically , i have a large file with more than 5000 lines in the following format Below snip given two blocks of the entire file. What i need is to search for given String name (eg: abcd etc) , and ...
0
votes
1answer
25 views

Redirect input from file

I'm writing a script (TEST.sh) that must run another script (TASK.sh)... Task.sh need two input... so I was thinking to redirect input from a file (I need to automize everything)... So, I was using ...
4
votes
1answer
61 views

Way of receiving alerts on login attempts, whether successful or not?

I believe my linux machine to be reasonably protected from external login. But since I am mildy paranoid, I would like to be alerted when there is a login attempt made to the server, whether ...
1
vote
2answers
41 views

Automatic screen capture script

I'm looking to accomlish exactly what Anwar Shah describes here Bash script to take screenshot and save the image - Ubuntu with the added functionality of setting a time increment for the script to ...
0
votes
1answer
13 views

Convert fb2 to txt

There are still a lot of devices that can't read fb2 and able to read txt. Also, txt version could take much less space compared to uncompressed fb2.
0
votes
1answer
93 views

Is sim a shell script command?

I was creating a sym-link for practice in Ubuntu 14.04. I meant to use this command: ln -s ../fun dir1/fun-sym It was taken from a book I am using. Except I used sim at the end by mistake. So the ...
0
votes
2answers
92 views

setting up a script to rotate scren Lenovo Yoga Thinkpad S1

I am trying to set up a Lenovo Yoga Thinkpad S1 to rotate the screen with the touch of a button but I am having a little trouble with the script that actually does the work. I have found the scripts ...
1
vote
1answer
33 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 ...
1
vote
0answers
50 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
26 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
62 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
35 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
32 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
70 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
25 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
65 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
45 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
749 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 ...
0
votes
0answers
106 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
54 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
36 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
0answers
16 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
19 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
274 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
27 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
36 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
69 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
1k 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
45 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
11 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
47 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
59 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
27 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
22 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
312 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
72 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
45 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
29 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
126 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
220 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
78 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
37 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
59 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
68 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
83 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
36 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 ...