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

learn more… | top users | synonyms (1)

0
votes
0answers
11 views

automate processes based on priority and memory size.

I have written a script to output vmstat etc according to user input and have also written a script for process control based on user input. the process script allows the user to use a series of menu ...
0
votes
0answers
12 views

CRON doesn't run tasks because “/bin/bash: /var/log/cron.log: Permission denied”

I have the following CRON task: MAILTO="my@email.com" # Begin Whenever generated tasks for: projectname 30 4 * * * /bin/bash -l -c 'cd /home/deployer/apps/project_production/releases/20150305135322 ...
-1
votes
0answers
6 views

Auto start guake on start up (Debian)

I am working on a Debian at the moment and want to use guake. However I want to avoid the task of going into applications and clicking to open it every time I login or boot the machine up. After a ...
0
votes
1answer
12 views

why is “export PATH” displayed in terminal as a title?

I have a long time using Ubuntu, probably 3 or 4 years, I've never had the need to "export a path". Now, I was installing Xilinx ISE 14.7 in Kubuntu 14.04 Trusty Tahr LTS following a tutorial, at ...
2
votes
0answers
13 views

bash script to cd into an USB device

i am creating a simple updater for a program which will be ran on an Odroid C1 with Ubuntu 14.04 Server.. Preamble 1) i want the updater.run downloaded from my server and placed into an USB; then ...
5
votes
7answers
329 views

How to count char's number?

For example I have file 1.txt, that contain: Moscow Astana Tokyo Ottawa I want to count number of all char as: a - 4, b - 0, c - 1, ... z - 0
0
votes
0answers
22 views

how to output sysstat to cron or other scheduling script?

This question was requested in response to this thread: can't find package crontab-ubuntu 12.04 I have a script which allows the user to select how long iostat, vmstat and sar are run for and ...
2
votes
1answer
33 views

can't find package crontab-ubuntu 12.04

I am trying to install cron for scheduling and before anyone says duplicate, I have tried the methods of sudo apt-get update and upgrade mentioned and they don't work. When I go to install crontab, ...
0
votes
0answers
14 views

Simple shell script for iPerf [duplicate]

We have an Ubuntu network in our test lab, and run traffic using iPerf. I want to automate the process a bit by writing out a script that would run the following from a terminal: iperf -s -u -P 0 -i ...
0
votes
0answers
13 views

automatically launch bash scripts that are currently user controlled? [duplicate]

I have written some scripts to collect system statistics through vmstat, iostat and sar and another script that controls processes. The process control one reads information from a text file and ...
-1
votes
1answer
22 views

Command output to file, new lines at top [duplicate]

I'm rewriting some 20+ year old Unix scripts and I want the output to go to the screen and a file. I know this is possible with tee. Is there a similar command that stacks new lines on top, at the ...
1
vote
2answers
20 views

Why does cp not copy a specified folder

let's say that I have a following file structure: ~/DIR1 -fileA -DIR2 --fileB Then, being in ~, I run this script: cp DIR1 NEWDIR2 And just an error happens: cp: omitting directory ‘DIR1’ I ...
2
votes
1answer
21 views

“cd” redefinition causes infinite loop in bash

I redefined cd in my .bashrc to: function cd() { builtin cd $* pwd } This worked for a while, until I mistyped cd *2 as cd *(2 When I did that, bash prompted me, I went "d'oh", and when I ...
-1
votes
0answers
19 views

Shell scripting for date intervals [on hold]

How can write a shell script (e.g. bash) that calculates the difference between two entered dates?
1
vote
1answer
41 views

Permission denied [on hold]

I am using Ubuntu 14.04 linux and 64 bit pc. Whatever I try to install through terminal am getting the following error bash: /home/vinod/android-sdk-linux/tools/android: Permission denied
0
votes
1answer
44 views

What does cd [-L] [-P] [-e] [-@] do?

Out of curiosity I typed cd --help to see if there were any extra things you can do with changing directory, and it came up with cd: usage: cd [-L|[-P [-e]] [-@]] [dir] What does each option do? I ...
0
votes
2answers
32 views

Bash Syntax error while using 'source' command in Ubuntu 14.04

The error message displayed in my terminal has been pasted below. sarvotham@ramanPC:~$ source("http://bioconductor.org/biocLite.R") bash: syntax error near unexpected token ...
0
votes
0answers
18 views

How can I truly clear a terminal window? [duplicate]

When I run clear in the terminal, the tab appears to be cleared of text, with only a fresh command prompt visible in the top left corner. However, the scrollbar is still active and if I scroll up, I ...
0
votes
2answers
44 views

How to create the command in bash? [on hold]

Are there ways to create my own command in bash, except copy of the script in the /bin and create an alias?
2
votes
2answers
114 views

Pipe file to gnome-open command

For example I want to open a specific book from Books directory. To find it I do ls | grep -i 'book_i_want' Ideally I would like to add next pipe with command, like this: ls | grep -i 'some_book' | ...
0
votes
1answer
33 views

How to Perform operations on files or directories with dashes or hyphens? [on hold]

My question is that I was trying to rename a file named 12F-XYZ.pdf to 13F-XYX_ABX.pdf. Now the problem that rises is that both of hyphen the original and the required names have hyphens I know that ...
0
votes
0answers
23 views

Bash cursor graphical bug in ubuntu 14.10

For the past few weeks (I'm not exactly sure on the timeframe, but I think it coincides with me upgrading to Ubuntu 14.10) I've had an issue with my terminal where, while typing, the white cursor ...
3
votes
1answer
116 views

Bash script, arithmetic with floating point variables / strings that represent them

I'm trying to create a simple script that takes an average load percentage of the CPU each minute. I'm doing this by using the sar command from the sysstat package. Here is my current code: ...
1
vote
1answer
18 views

Alias for gnome-open to open different files

I want to make alias for gnome-open so I be able to open files with command opn somefile.doc How can I pass filename with this alias?
3
votes
1answer
145 views

How to find a place where a constant is defined in Bash

I need to find at least a file where $JAVA_HOME is defined (exported). Is there any smart way to do that besides text search in files?
0
votes
1answer
19 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 ...
9
votes
3answers
350 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
16 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
11 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
68 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
36 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
16 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
21 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
3answers
52 views

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

I would like to create a command-line alias to run a game (Minecraft in particular). How would I accomplish this? I want to type in runmc to run the command java -jar /root/.minecraft/launcher.jar. ...
3
votes
1answer
53 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
35 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
162 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
45 views

How to replace first string before first space [closed]

NC_009925.1_13653 [754389 - 754574] Acaryochloris marina ATTCCTGATTCTCTTGATGAAAGTAACATTATGGATCAT... TATGATCCATTCAGGCATGATGCAAGGCGCTACCCCCAA... 110311 2992101 2992319 len=219 ...
0
votes
3answers
48 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
12 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
27 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
33 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
41 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
76 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
21 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
23 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
32 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
38 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 ...