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

learn more… | top users | synonyms (1)

0
votes
2answers
26 views

How do I use the set command to find directories in my path?

I am taking a linux class this semester and one of the questions on a lab is: Use the set command to find out all directories in your path. Normally, I would just use $PATH to find out the ...
0
votes
1answer
12 views

How to check for any activity on a physical disk?

I have an SD card that's connected via a USB interface. The output of fdisk -l indicates the following: Disk /dev/sdb: 3965 MB, 3965190144 bytes I have a script that re-initializes multiple ...
0
votes
0answers
25 views

Bash script environment can't get exported variable from user

I have a user daniel, from which I'd like to retrieve an exported value as root. So I did some research and came up with this command: $ su - daniel -c '. ~/export_script; echo $EXPORT_PATH' > ...
0
votes
1answer
25 views

Help me remove this Bash error

The bash error below keeps popping up each time I open a new terminal, why is that? How do I fix the bash error below? bash: /home/yonas/.rvm/scripts/rvm: No such file or directory
0
votes
1answer
52 views

Code works in Terminal, but not when in a script

I have: This is my zip file.zip in path $dec If I manually copy this code over to the terminal window, I get the correct output. But, if I take the same exact code and put it into a .sh file and ...
1
vote
1answer
22 views

Differences between md5pass and md5sum

This question may be insane ,but due to definition of hash algorithms, hash algorithms are some kind of functions that accept variable length input and make it encrypted and the output always has a ...
-1
votes
1answer
19 views

“Command not found” after running a file compiled on the same directory

I don't know what is going on... d@d-SVF15A17CDB:~/University/CSC209/a1$ gcc -o remvocals remvocals.c d@d-SVF15A17CDB:~/University/CSC209/a1$ dir remvocals remvocals.c ...
0
votes
0answers
47 views

IF statement not traversed correctly in script responsible for unpacking zip files

I've been working on an IF statement for a couple days now and have been unsuccessful at getting it to run correctly. All of the embedded code seems to work when I manually paste it in Terminal, but ...
0
votes
1answer
15 views

Implementing an if clause in simple bash script

I've got a bash script that makes use of cal -m $v where v is number . The user is prompted for v's value at the beginning of the execution . In case the user presses ENTER instead of introducing a ...
-2
votes
1answer
28 views

How to combine ls and grep to list only files and using ls to count dirs

I have some troubles with combining ls and grep. The thing is that I have to use only ls and grep to list all files in home directory. Ive tried multiple of combinatnions but with no effect. I think i ...
0
votes
1answer
20 views

Syntax for regex in IF statment

I'm trying to come up with the syntax for a regex in an IF statement, but I'm not quickly having success... Can anyone lend a quick hand please? if [[ "$path/$file" =~ .{txt,doc,docx,xlsx,rtf} ]]; ...
-1
votes
0answers
54 views

The program 'sed' is currently not installed. You can install it by typing [on hold]

I was trying to create my own program in the /usr/local/bin. During the process I messed something up and now anytime I press enter or type anything in the command line, I get this stupid ...
-1
votes
0answers
27 views

Opening a scoket in Kali linux using bash scripts trouble [on hold]

I know who to open a TCP or UDP socket in Ubuntu, by the following command : exec 3<>/dev/tcp/google.com/80 (for example) we can open a TCP socket on port of 80, but in Kali Linux there's no ...
0
votes
1answer
18 views

A problem when invoking a function in a bash script

I've written the following bash script to find a driver's name, I'd make it better but for now I just want to know why this script doesn't work ? #! /bin/bash ## the driver's name ...
0
votes
2answers
23 views

How do you create a shell script?

I need to create a shell script that will create a user then put it into a group. How do I do it?
0
votes
1answer
15 views

A bash scripting problem

In advance , I'd say I know the basic syntax of bash scripts but the following statement is not recognized for me : if [ ! -f /etc/debian_version ] could you help me what this condition going to ...
0
votes
0answers
25 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 ...
1
vote
0answers
25 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
21 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
56 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
21 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
38 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
25 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
30 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
17 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
13 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
20 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
20 views

translate windows bash script to sh on ubuntu [closed]

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
52 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
25 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 ...
1
vote
3answers
43 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
35 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
42 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
24 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
19 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
18 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
14 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
31 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 ...
15
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
187 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
10 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
39 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
249 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
79 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
116 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 ...