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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

how do i achieve executing a python script ON TERMINAL via a shell script in nautilus folder by the right-click>Script way?

Using nautilus i am writing a script which will run the python script which invoked it. So to run a python script i just need to right-click on it>goto scripts>select appropriate script and it will ...
0
votes
0answers
9 views

Desktop Environments Incorrect After SLiM Install

I am working on making an automated install based off of Lubuntu using Debian Installer so that the install is as automated as possible (a few inputs at the very beginning). So far I am mostly pleased ...
1
vote
1answer
14 views

PATH is not getting exported by default in Ubuntu 12.04

When i run su on command line and enter root password, I am getting error as mentioned below: Command 'lesspipe' is available in the following places /bin/lesspipe /usr/bin/lesspipe ...
0
votes
2answers
49 views

A strange problem about terminal or command environment

Two weeks ago I was learning Python and Flask. I followed step-by-step the steps in The Flask Mega-Tutorial, Part I: Hello, World!. While I was following the tutorial, I had problem in "virtualenv", ...
1
vote
1answer
8 views

How to temporarily disable sleep and hibernate from the command line

It seems like there are many ways in which a Ubuntu's settings can be permanently manipulated to sleep when desired as long as predetermined conditions are met. However, these are more permanent ...
0
votes
1answer
27 views

Why isn't Roundcube's Upgrade Shell Script Working?

I am trying to upgrade my Roundcube installation from version 1.0.4 to 1.0.5 and I cannot get the upgrade script working properly. According to Roundcube's upgrade documentation, the following command ...
0
votes
2answers
19 views

bash script dollar sign operator $ question - is it incompatible to ~ operand?

I am new to the Linux environment. After a quick search I could not find a helpful question about the $ operator used in bash scripting. I do not know if this question relates more to the Ubuntu (or ...
0
votes
0answers
10 views

After using 'umask 002, the 'w' shows ?xdm? under the IDLE column

After running "umask 002" the "w" command lists under IDLE ?xdm?. I've reset (I think) umask to 0000 but I still get ?xmd?. i can't give a screen print as I'm asking this on another machine, I have no ...
0
votes
0answers
28 views

Bash puts ':' after each command

I updated my bash_aliases from another system I own, and now, I have found the following problem: If I use a command, bash put : after each command and alias. Why? What can cause this problem? In ...
0
votes
0answers
12 views

Pulseaudio increase volume above 100% per channel

I'm using a bash script to start kodi (aka xbmc) in Ubuntu. The script adjusts the volume per channel for my 5.1 sound system: amixer -D pulse sset Master 90% amixer -D pulse sset 'Master' ...
0
votes
0answers
12 views

What's mean of command? [on hold]

I have .bat file to start game server, in the code of them has a command but i dont know is this DOS's command or java or shell command ?. On startgame.bat echo ------------------------- java ...
-1
votes
0answers
15 views

What you want to see in daily server monitoring mail?

I write bash script, which collect information from ubuntu server and send it by mail. With this script you can see: Your clamav antivirus information Which ports are open How many users in your ...
-1
votes
0answers
17 views

translate windows bash script to sh on ubuntu [on hold]

i've a .bat scripts running on windows but i want tranlaste it to shell to run it on Ubuntu server. however must keep it in background processing before server shutdown. Anyone known please translate ...
1
vote
1answer
28 views

Deleting input forward to the next space

This is my question: When in terminal I can use Ctrl+w to delete a whole word or IP (. is separator for each octet) when going leftward of prompt. However, if I try Alt+d to go rightward of prompt, ...
0
votes
0answers
20 views

Using bash script output with periodic output selectively to trigger a json

i have a python script that probes a motion sensor every few seconds and returns a value on the shell "sensor is off" or "sensor is on" i next created a bash script as follows called sensor.sh ...
0
votes
3answers
36 views

One liner ffmpeg (or other) to get only resolution?

I'm not really well versed in the command line so hopefully this isn't too stupid of a question. If I run: ffmpeg -i videofile.avi I get an output such as this: ffmpeg version ...
0
votes
1answer
16 views

SFTP change notifications

I am looking for any solution for my problem. I have SFTP access to client's server and I need some script or something else to watch after new files because they are added irregularly. I need this ...
0
votes
1answer
29 views

Can't call wget from Python script [on hold]

I am writing this script that executes a bunch of commands one of which is to download some packages from a certain url. Following is my script #! /usr/bin/env python #! /usr/bin/env bash import os ...
1
vote
1answer
36 views

Editing my Bash prompt

I'd like to put something into my bash prompt, but I'm not quite sure how to do it. I use the Cloud Foundry Command Line Tool to push code up to my servers. The cf tool can be set to a specific ORG ...
0
votes
0answers
21 views

the command argument is not passed to /bin/sh in popen

Here is a scenario where I use popen as FILE* stream = popen("Root", "r"); As per my understanding the Root argument will be passed to /bin/sh and interpretation is done. In my case, Root should be ...
2
votes
1answer
33 views

How to compare two (vague) file lists and print the duplicates?

I have two file lists. backup.txt and backup2.txt Some of the entries aren't exact, so it makes it difficult to find the duplicates with diff or uniq. Example: :::backup.txt::: auser_backup ...
0
votes
1answer
18 views

Match Pattern and write following value as variable

I'm trying to match a pattern and then pull the following information to create a file using that variable. Example (my data may look like either of the 2 examples) "headers": { ...
0
votes
1answer
17 views

What does `printf` do in rc.local?

I've encountered an /etc/rc.local script that gets some data and uses printf on it. My question is: where does that data that is printed go when rc.local is executed on startup? Is there a log file ...
0
votes
0answers
11 views

.xinitrc: can't reliably keep caps lock and ESC swapped

I use my .xinitrc file to run the following line: xmodmap /home/eric/.xmodmaprc. .xmodmaprc in turn contains the following: remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape ...
1
vote
1answer
22 views

My script only opens new terminals when the previous command's terminal is closed

Sorry if my title is a little hard to understand, I tried to condense the issue as much as possible. I'm trying to run a bash script which opens a new terminal for each major command, that way I can ...
0
votes
1answer
29 views

gsettings not working from within bash function

Pretty New to bash and only 6 months into ubuntu so please bare with me. Im creating a post installation script https://github.com/jjdemitriUk/relutionDev everything is going well so far its written ...
13
votes
3answers
1k views

How can I wake a sleeping bash script?

Is it possible to wake a process that is paused using the sleep command? As an example, lets say you have this script: #!/bin/bash echo "I am tired" sleep 8h echo "I am fresh :)" After 30 ...
3
votes
3answers
180 views

Sudo command in bash script halts the script

I have an early 2009 iMac with a sensor problem. The ODD and CPU fans run at full speed. To get them down to minimum speed in Ubuntu I need to set the speeds in the Terminal, using this method. Rather ...
0
votes
0answers
9 views

Ubuntu server VM install has limited bash functionality

I installed Ubuntu Server 14.04 in a VM and I selected the VM option during installation since my host has limited memory. I accepted the fact that most features will be disabled in such a system for ...
1
vote
1answer
34 views

Fast change of my ip/proxy in terminal for one command

I need to change my IP for one command in bash command line, so I want use proxy (123.123.123.123:80 format), how can I do it? For example if I write: curl ifconfig.me I get my original IP, so how ...
3
votes
2answers
245 views

Run the file in folder called `python` not the python interpreter

I have a folder. Inside of this folder is an executable called python. When I try to run python from the terminal it instead runs the python interpreter. How can I run the file called python?
1
vote
1answer
72 views

While Loop Syntax Error

I'm attempting a modification of apt-fast to support parallel downloading and installation. I'm having some trouble with this loop: get_install(){ while ((!${pkg}-finished)) do if [ "$CURNUM" -lt ...
0
votes
0answers
16 views

customize ubuntu with bash scripts - never turn the screen off [duplicate]

I'd like to disable the screen from dimming automatically. It is manually done in Settings > Brightness & Lock > Turn screen off when inactive for: Never. I want to do it with a shell ...
0
votes
2answers
75 views

Script to find size of image files

I've got image files scattered all around my computer so I'd like to write a script that receives as input a full path to a directory, display the total size of image (.jpg , .jpeg) files in each of ...
1
vote
2answers
112 views

How can I delete all folders of a specific name without deleting Contents in it?

How do I delete all Folders with a specific name (e.g. 128Kbps_Songs) without deleting its files For example if I have directory "MP3_SONGS" with subdirectories "A", "B", "C" and each subdirectory ...
1
vote
2answers
31 views

How to return default PS1 prompt?

After installing docker (I definitely think this is about docker) I got changed cmd-label. For instance, it was like username@root8hgf858$: your_command to [:/home/username] $. How can I fix it? ...
0
votes
0answers
17 views

Putty - storing history globally [closed]

I was wonder how Putty store history I have server and multiple account there. Every account has a history when I use "history" it list history from that account. Is there something like global ...
0
votes
1answer
40 views

Getting a dpkg error when using apt-get upgrade

I am getting this dpkg error when using apt-get upgrade: dpkg: error processing package bash (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting ...
1
vote
1answer
20 views

How do I fill certain percentage by height of an image using ImageMagick commands in ubuntu?

I have an image with around 20% of its bottom filled with white color. But the image has some dots of other colors than white. I have 100s of such images which I would like to remove those dots from. ...
1
vote
2answers
46 views

How to stop and remove the docker

I'm trying to remove a docker/images/containers and all stuff which is somehow connected with docker, but first of all I neeed to stop it. While I'm trying to execute this command: docker stop ...
0
votes
1answer
29 views

Bash Script - Editing Lines on Text From File

I'm using a bash script to read in data from a text file. #!/bin/bash file="/home/nexusfactor/Desktop/inputData(linux).txt" while IFS= read -r line do # display $line or do somthing with ...
1
vote
1answer
19 views

Get window name of byobu session in bash

is there a way to get the byobu window number (or window name) in shell? I want the same code to behave differently depending on the window in which it is running: I am thinking about something like ...
3
votes
1answer
124 views

How to display all services and version that runs on a host?

I am trying to display all services and their versions that runs on a host using ports from 1 to 1023, in this way: ssh, OpenSSH 5.9p1 Debian 5ubuntu1 (protocol 2.0) smtp, Postfix smtpd http, Apache ...
-2
votes
0answers
15 views

Moodle and php, bash [duplicate]

I write a spesial page in Moodle with buttons, which will be turn on another functions from my programm on server, for example send for spesial user email or anather action. How can i run programm on ...
-1
votes
2answers
53 views

bash comparison of integer always returns true?

I have the following simple bash script. for some reason it always returns true. #!/bin/bash service=hhvm status=($(ps -ef | grep -v grep | grep $service | wc -l)) if [[ $status -eq 0 ]]; then ...
0
votes
1answer
18 views

autoremove option doesn't work with apt alias

I have set up an alias for apt-get as apt, for convenience. This works fine, I can do sudo apt install PACKAGE sudo apt remove PACKAGE sudo apt update etc with no issues. However, the autoremove ...
0
votes
2answers
82 views

How to read user last email using a shell script?

Let's say I have two machines A and B On A I have installed and configured a SMTP and IMAP server For example I have user: george with password: 123456 on Machine A I am trying to write a shell ...
2
votes
2answers
73 views

How to use 'if' inside '-exec' attribute of 'find'?

I have a directory with many pairs of files. Each non-text file has a textual description partner. For example a directory can look like this: a.jpg a.jpg.text b.ogv b.ogv.text cd ef.JpG cd ...
2
votes
1answer
40 views

Desktop icon position (programmatically access and manipulate)

I'd like to programmatically access and manipulate the Desktop icon positions, their icons, etc. This is for files and directories that you keep in ~/Desktop . Where is this stuff stored?
0
votes
1answer
21 views

Problem setting up Environment for 'make' command execution

I am trying to set up devkitPro for ARM use, but I continuously get an error while executing the last two commands. The commands are make and make install. The tutorials I am following: ...