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

learn more… | top users | synonyms (1)

0
votes
1answer
44 views

Script that ssh to remote host enters pass and executes a command?

Is it possible to make a script that ssh to remote host, enters the passwords to log-in and then executes at least 1 command on the remote machine?
1
vote
1answer
54 views

Question about something appearing in my Terminal

After I moved from Windows to Ubuntu I liked to try out every new app I found so I decided to install Betty (a Siri like alternative for Ubuntu). I used the PPA given by Webupd8 site and the last ...
-1
votes
0answers
10 views

vncserver prompts for password every time

I am a Linux noob, and I am performing some tasks for the very first time. I have a bash script that uses vncserver (so i would prefer to stay with vncserver). The script used to work properly when ...
0
votes
0answers
49 views
+100

Prevent *buntu from updating dictionaries during install

In utilizing Vagrant to install an Ubuntu server box with a GUI (lxde), the shell provisioning fails due to what seems to be a frequent issue when setting up dictionaries. The resolutions seem to all ...
1
vote
0answers
27 views

xdotool for writing a preformated command in bash [closed]

when I run prompt$ xdotool type 'find -iname "**"' I get this find -iname "**"prompt$ find -iname "**" how could I have that prompt$ find -iname "**" I use xdotool to fill the command line ...
0
votes
1answer
18 views

is source code for bash sufficient, when I want source code of ext4?

when I want to know the source code of ext4-filesystem (mkfs.ext4) - is it then sufficient to download the source code for bash ? - or do I need else source-codes after I did : sudo apt-get ...
0
votes
1answer
16 views

awk: runaway regular expression

I can run command on ubuntu: free | grep Mem | awk '{print $3/$2 * 100.0}' And get result: 20.1092 But when I try to put it in alias: alias memTotal="free | grep Mem | awk '{print $3/$2 * ...
0
votes
1answer
20 views

Paging standard out using 'more', and piping to syslog

I've implemented a wrapper script which causes all commands executed via this wrapper script to log (via rsyslog) things such as the execution time, the user that ran the command, and the exit code. ...
0
votes
2answers
38 views

Bash tries to run python on unknown command and fails in Py_Initialize

Running Ubuntu 14.04 and updater says that all software is up to date. Have tried rebooting. I am preparing for a class that uses Python. I have installed it and it works fine. However, I now have ...
0
votes
1answer
29 views

Getting “no such file or directory” bash error when trying to compile a file

I have already checked out the many similar questions on this website, but I keep getting this error when trying to run my program conversion.cpp with ./conversion. The program is here: (i can't ...
1
vote
2answers
44 views

.desktop file doesn't execute a script, works fine when run by hand

I am having problems with my .desktop files. I have a shell script that constantly watches for a file to be put into the "Downloads" folder. When a file is put into the folder it automatically ...
0
votes
0answers
40 views

How to run correctly bash script from another script?

I want to run sqldeveloper on Ubuntu Gnome 14.04. I created some symbolic link and tried to call from one script file another. And it fail with message: /usr/local/bin/sqldeveloper: line 2: ...
0
votes
0answers
47 views

Get file created by a program launched by a bash script

I have the next scripts: | base_dir/ | - test.sh | | tests/ | | - elaborato.sh test.sh run elaborato.sh elaborato.sh could create a file (not always it create a file). I need : to know the ...
2
votes
1answer
95 views

How to get PID of shell running in a terminal window under mouse?

Though similar questions asked before in this forum here , here and here, my question is different. I want to get PID of a running bash process in gnome terminal. Note: Suggested link which posted ...
0
votes
2answers
98 views

Autostart program whenever a file is added to the Downloads folder

I have Lubuntu 14.04 LTS on my laptop for a few weeks now. I have been working on customizing the OS and such quite a bit, as well as installing everything that I need for daily usage. One thing I did ...
0
votes
1answer
42 views

Writing a bash script to execute/automate install of drivers

i'm trying to write a script to automate the install of TV card drivers (for some reason i have to re-install after each ubuntu update). Would this work? I've tried it but it doesn't look like it's ...
0
votes
0answers
10 views

Problem during the usage of up and down keys for checking up and down arrows

I am facing an issue during the usage of up and down on gnome-terminal. Lets say my previous commands are vi pos_of_rightmost_setbit.cpp gcc -o harsha pos_of_rightmost_setbit.cpp At this point ...
1
vote
1answer
26 views

Desktop shortcut doesn't work for script but script work fine

#!/bin/bash/ ls -1 *.mp3 > playlist.m3u for (( ; ; )) do mplayer -playlist playlist.m3u; sleep 0.1; done This is the script and it works ! [Desktop Entry] Version=1.0 Type=Application Name=Play ...
0
votes
0answers
29 views

bash: Permission Denied when I move my CPP file to another location

I crafted a test CPP programme. It created a file in the home directory. It compiled with ease, and I could run it by typing ./rocketfire in the Terminal. Now, I did these: abhimanyu@AbhimanyuPC:~$ ...
2
votes
2answers
141 views

How do I get `tr` command to ignore newline?

I want to replace multiple spaces by a single space. I am using tr to do this. But it is also replacing new line with a space. How can I avoid it? Code: tr -s [:space:] ' ' Input: He llo Wor ld ...
6
votes
2answers
347 views

Why do I get different outputs in case of sh and bash?

I have the following simple script: #!/bin/bash echo "Bash version ${BASH_VERSION}..." for i in {1..99..2} do echo $i done Output in case I run with sh file.sh: Bash version ... {1..99..2} ...
1
vote
1answer
42 views

BASH script for extracting archives - how to make the script ask for folder destination?

I've started using the bash script below, for unpacking archives. How would I go about making the script ask if I would like to specify a folder, or just use the default folder to extract to? I'd ...
1
vote
2answers
60 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
54 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
23 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
55 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
27 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
10 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
73 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
60 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
23 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
34 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
48 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
34 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
51 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
42 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
39 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
722 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
58 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
42 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
23 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
15 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
15 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
120 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 ...
2
votes
0answers
31 views

Echo difference between Ubuntu and Red Hat [migrated]

I have mostly been experimenting with Ubuntu but recently was using a Red Hat Enterprise system and was surprised at a difference I found setting and displaying env variables. In Ubuntu I might have ...