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

learn more… | top users | synonyms (1)

0
votes
1answer
29 views

printing from arrays vs awk 'NR

I am currently printing out values from vmstat stress tests using this: vmstat -a $INT $CNT | awk 'NR > 1 {print $13,$14,$15}'> vm.log_$D & sleep 5 && stress --vm $cores -t ...
0
votes
1answer
16 views

How to get help on a specific option of a command [duplicate]

I guess the title says it all. I know I can get help on a specific command, for example wget, like this: wget --help But how can I get help on some specific option of that command? For example, I ...
6
votes
2answers
143 views

Pre-define colors for Terminal?

I was trying to remember how I could pre-define colors inside of .bashrc file so they could be called on when I do ${RED} for example. I can't remember if this was the right way of doing it, but it ...
0
votes
0answers
12 views

see how much virtual memory is assigned to a process-bash

I have written a script which assigns virtual or "simulated" memory to a process that I have created. What I want to know is, how can I then list how much memory the process has? I want it to return ...
0
votes
0answers
7 views

Cloning Ubuntu 14.10 installations

I need to use a range of Cloud VPS providers to run servers across the world. The first batch of providers is Vultr, DigitalOcean and DimensionData. Each of them offer the ability to create ...
1
vote
1answer
62 views

Is it possible to run stress at the same time as vmstat/iostat etc?

I have written two scripts-one to stress the system and one to run vmstat etc. I am able to get the file outputs for vmstat etc but am not able to get the ones for stress as it tells me that the file ...
2
votes
1answer
30 views

Execute a shell script only for LiveCD session [on hold]

I want to execute a shell script on startup but only for LiveCD session not for harddisk installation. Which directory should I put my shell script? For example Ubuntu somehow detecting LiveCD ...
0
votes
1answer
6 views

Having trouble running setup-environment (YOCTO) in a ubuntu 32-bit VM

I am running a 32-bit Ubuntu in VirtualBox on my i7-64 bit System and was following steps to build YOCTO; In the process, I have to run the following command $ MACHINE=smarch-samx6i ...
0
votes
0answers
19 views

How to run an alias command with sudo [duplicate]

I created an alias called runmc that allows me to start up a java program. But I noticed that when I type in "sudo runmc" (It needs root access to work properly.), it will display "runmc: command not ...
0
votes
4answers
41 views

How would I create an alias to run a game? (Minecraft)

How would I accomplish this? I want to type in runmc to run the command java -jar /root/.minecraft/launcher.jar. I already put the following into my .bashrc file alias runmc ="java -jar ...
3
votes
1answer
46 views

How can I run a script when the power supply is plugged-in or -out?

For some reason, my laptop's screen brightness does not update when I plug-in or plug-out the power supply. I've looked at quite a few solutions for that problem, but none of them seemed to work well. ...
0
votes
1answer
33 views

Script wont print my echo statement (Also need to suppress the warning)

I am trying to write a very simple shell script in Linux. The Scenario I am trying to achieve is: Creating an user account and giving it a password internally (No interaction with user allowed for ...
4
votes
1answer
158 views

How to prevent output from '&' and '>' operator (send to background operator and redirection operator)

I have tried various combinations of gedit, &, >/dev/null 2>/dev/null. When gedit is used with the other two it always prints something to the terminal. I understand that the numbers are ...
-2
votes
0answers
44 views

How to replace first string before first space [on hold]

NC_009925.1_13653 [754389 - 754574] Acaryochloris marina ATTCCTGATTCTCTTGATGAAAGTAACATTATGGATCAT... TATGATCCATTCAGGCATGATGCAAGGCGCTACCCCCAA... 110311 2992101 2992319 len=219 ...
0
votes
3answers
42 views

Shortcut to execute shell scipt? [duplicate]

I'm trying to create a shortcut that will run a .sh file deep in some directory without having to navigating to the absolute path. I have tried using aliases, which did not work as. Using soft/hard ...
0
votes
0answers
8 views

Failure to contact privoxy proxy on ec2 node

I'm trying to set up a tor node following http://sickbits.net/creating-a-personal-privoxytorproxy-ec2-instance/ using ubuntu 14.4 lts on ec2. I'm using git-bash on win7. Following the directions, I ...
1
vote
1answer
25 views

bash script errors in ubuntu 14.04

I wrote a script whilst on ubuntu 12.04.5 which ran through fine however after upgrading to 14.04.2 to fix another issue i am now having issues with the script. It is halting at the first set of ...
0
votes
1answer
32 views

Problem with sudo via ssh

I'm using the following script to execute a update script on a certain number of servers in my network. Here is the part, which I think that is relevant. ### Actual Work ### if [[ $manual == 1 ]]; ...
0
votes
0answers
17 views

Pngquant returns error in Crontab [duplicate]

I have created a small script to compress all the images using pngquant in Ubuntu 14.04. The script is as follows: #!/bin/bash find /home/ghosthut/wp-content/uploads -mtime -2 -iname '*.png' -print0 ...
0
votes
1answer
40 views

Excluding hidden files in locate

We have a Ubuntu NAS sharing SMB and Netatalk with some Macs and I often use locate to find my files. Unfortunately since installing Netatalk it has written tons of .AppleDouble cache files to share ...
1
vote
2answers
71 views

Wait for PID - shown in ps

I am using the command below in a script to wait for a PID and then do something when that process finishes: while ps -p [pid] > /dev/null; do sleep 1; done; [cmd] where [pid] is the PID of the ...
0
votes
1answer
19 views

Cross fading several audio files using sox

I'm trying to cross-fade several audio files together with a 3 second cross-fade and join them together in to one file with sox. I can join several files together by the command below but not sure ...
1
vote
0answers
21 views

If you install anaconda, how can you inactivate the anaconda environment?

I'm currently using Anaconda to get access to a "standard" set of packages on nearly any platform. The issue is, on the linux side of the house, my current approach is to tell the installer to ...
2
votes
1answer
28 views

Some error messages displayed when I start terminal (both as root and as normal user)

I recently installed Android Studio , and to make the changes permanent I changed the PATH environment variable in .bashrc file, as shown in Second answer of this link. I get following error ...
0
votes
0answers
18 views

Long view for tab completion?

Is there any way to show a long view (e.g., timestamp, permissions, filesize, etc) for tab completion of filenames in bash?
0
votes
1answer
30 views

Terminal shows black screen Ubuntu 14.04

When I open the terminal in my Ubuntu 14.04 LTS, it shows a black window with no buttons. Nothing's visible, not even the minimise or close button. However all the commands that I type, work ...
1
vote
0answers
27 views

Randomizing host name and mac address on boot

I'm trying to set up a startup script to randomize my hostname and mac address on boot. Here is the script http://pastebin.com/qatdtbVH The random mac address is working fine, but the hostname ...
1
vote
0answers
38 views

Altering command to start application by mouse click - how to

I have Google Earth installed on my Ubuntu 14.04 (Trusty Tahr) and, in order to display clamped polygons on it, I have to start it with the command LIBGL_ALWAYS_SOFTWARE=1 googleearth. I would ...
0
votes
2answers
37 views

Compare names of files in two directories in command-line

Is it possible to compare names of files in two directories? I need to get information about how many similar and how many different names of files in directory some_directory and other_directory
2
votes
1answer
34 views

What mean numbers in output of history

Output of history command looks like this: 1975 mkdir adrnln/work_dump 1976 ls 1977 code What does numbers on the left side mean? Is it true that commands entered for example on Monday will be ...
0
votes
2answers
44 views

Sleep time variable from file?

I am wanting to know is it possible to have sleep in a bash script have a variable time that is read from a file? I am wanting to perform operations in the script that vary in length that will have ...
0
votes
1answer
19 views

error when processing package bash

When upgrading I keep on encountering an error with the bash package. This is the result I get. dpkg: error processing package bash (--configure): package is in a very bad inconsistent state; you ...
1
vote
0answers
35 views

How to automate configuration of legacy wireless drivers during installation

Perhaps the most common roadblock in deploying Linux on donated machinery is getting them to access the wireless network, due to the known issues with supporting legacy Broadcom drivers. Instead of ...
1
vote
1answer
21 views

Why I cant see password prompt when .profile executes?

I want to use keychain for SSH cron jobs. I've found this good answer. I've add command keychain --nogui id_rsa in .profile And when I reboot and login I have to enter password. But I don't see any ...
1
vote
0answers
17 views

How to compile Zoneminder source files

I'm trying to make a video surveillance system with my Raspberry Pi (running raspbian) using Zoneminder. Default action of Zoneminder is only to send an e-mail but I want also to run a script which ...
0
votes
1answer
30 views

Sourcing a script from another script fails

I have a script in a file - install.sh - with this content: #!/bin/bash wget https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh sh kvminstall.sh source ~/.kre/kvm/kvm.sh Everything ...
0
votes
2answers
46 views

Custom Daily and Weekly Cron Jobs Not Running

I created a script to back up my databases and my websites. It runs fine if I run it straight up but it's not running at all as a cron job. I created a symbolic link to the script: lrwxrwxrwx 1 root ...
3
votes
1answer
31 views

I want to print a user specified number of labels without opening Libreoffice

I'm using Ubuntu in a restaurant. In this case I'm using a Brother label printer to print "Use By" date labels. To print one I can use the command libreoffice -p ~/Desktop/TestLabel.odt I have this ...
0
votes
2answers
34 views

.sh command not working in a desktop launcher

I'm using a desktop launcher to run a.sh script. In a.sh I'm calling another script b.sh using another user using this command sudo -u userB /home/userA/Documents/b.sh. But for some reason it's ...
0
votes
0answers
26 views

Running cron scripts with php and node

I've gone through many posts for cron jobs, but still was unable to run it on my Ubuntu 14.04 environment. I have a file test.sh in /tmp/test/. The test.sh contains several other scripts in PHP and ...
1
vote
1answer
23 views

Awk variable passing question

This is the code I wrote to resolve DNSs and output to a file. Is there a way to forgo the while loop entirely and just write in awk? It works perfectly but it seems very cumbersome and inefficient, ...
0
votes
2answers
39 views

App is accessible through Unity Launcher but can't access through terminal

I had installed Sublime Text 3 a few months back, and using some online resource I had made it accessible through Unity Launcher(unfortunately, I don't remember which resource, or how I did it). So, ...
1
vote
0answers
26 views

Ubuntu Server 14.04 - won't run bash script file from desktop [duplicate]

I know there are tons of this question on here already but none of them seem to have solved my issue. I've done a clean install of 14.04 Server and install Unity (I know, boss asked for it so he can ...
0
votes
1answer
40 views

SOLVED prefix command error

When open Terminal I get this error ERROR: Directory [=] does not exist. The prefix script allows you to manage multiple installations of a set of software installed on the same machine. It helps ...
0
votes
1answer
28 views

Change bash title to show truncated pwd [duplicate]

I use tilda as my terminal on Ubunut 14.10. The trouble I have is that I want to have the tab bar, since the titles in it are actually useful for navigation, but having username@computer:~/some/folder ...
1
vote
2answers
58 views

How to set and unset a global proxy with only one command

I want to set the proxy for apt-get and the global proxy in xubuntu like here but with only one command. How would it be? What's the problem with this code? I save it in ~/.functions add the line . ...
0
votes
0answers
20 views

Strange terminal color setting issue

I am running an Ubuntu 14.04.1 LTS server (3.13.0.45) which I usually access over SSH. I set up a custom prompt with the following in my .bashrc file: # uncomment for a colored prompt, if the ...
0
votes
1answer
32 views

Concatenate a variable onto the end of another variable or string in Bash

I need to create many variables that begin with "precip" followed by a dynamic string which is a read in variable. I read this variable in, let's say its "1971" and then I increment it by 5 a bunch ...
2
votes
2answers
59 views

How to set a proxy for terminal?

I am looking to set a proxy for terminal. What I need is I want to send all terminal communications to the internet through a proxy, say tor. I tried to set a system wide proxy set up. But Terminal ...
0
votes
1answer
38 views

Text appearing on top whenever I open terminal

Whenever I open my terminal I get this text at the top: bash: export: ...