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

learn more… | top users | synonyms (1)

1
vote
1answer
15 views

I accidentally canceled 16.04 Upgrade halfway through; dpkg status locked

I was upgrading from 15.10 to 16.04 and I got some prompts about config files having changed, e.g. /etc/xdg/autostart/at-spi-dbus-bus.desktop. So I type D to see the diff, but then accidentally hit ...
0
votes
0answers
9 views

Terminal is closing upon opening [duplicate]

Terminal is closing immediately after opening. I managed to open an alternative terminal with: env SHELL=/bin/sh gnome-terminal When I type ''bash'' in the alternative terminal: # bash ...
1
vote
1answer
19 views

Zombie process (kill both child and parent process)

Question: I want to make sure that both child and parent process are killed and echo if successful or not. I'm new on using bash script and having issue with my output. #!/bin/bash for p in $(ps ...
0
votes
0answers
10 views

run virtualenv in new terminal tab automatically

I am using virtualenv, so to start I have to say source some/long/path/bin/activate Sometimes (very often, in fact) I want to create another tab in terminal, to edit another script, or to run ...
1
vote
1answer
13 views

Need bash script output on one line - curl and >> produces 2 lines

I am running this bash script: #!/bin/sh date +"%Y-%m-%d %H:%M:%S " | tr -d 'n' >> /home/test_a5gh/Pub_IP.txt curl http://checkip.amazonaws.com?newline -s >> /home/test_a5gh/Pub_IP.txt ...
0
votes
0answers
21 views

Can't convert *.flac to mp3; “no such file or directory” [duplicate]

I am trying to follow this previous question and this associated wiki page to convert flacs to mp3s with a bash script. I have tried it with avconv and ffmpeg, with *.flac and ./*.flac, and I keep ...
7
votes
0answers
45 views

No tab completion with asterisk *

I am not able to tab complete from the command line in gnome-terminal when I have an asterisk in the command line. Default shell is bash, using gnome-terminal. For example, This works to copy a ...
-1
votes
0answers
18 views

How to create keyboard shortcut form terminal/shell script [duplicate]

I've already known that I can add custom keyboard shortcut via setting >> keyboard >> shortcut >> custom shortcut. But i want to do it from terminal or shell script which i can't find a way to do ...
0
votes
1answer
21 views

Delete all hidden files recursively in current directory [duplicate]

I have a directory which contains hidden files and by that I mean, not just the files whose name starts with . but also the files whose name contains ~ character at the end like somefile.txt~. I want ...
0
votes
1answer
26 views

Ubuntu alias rename directory issue

I have Ubuntu 14.04 Trusty Tahr installed in my system. I have created following alias in my '~/.bashrc' file to make renaming directories recursively in current folder, as easy to use short command. ...
1
vote
1answer
32 views

How to run a function for every specific received packet?

I am doing an experiment for my master thesis. I want to run a function (e.g. multiply two numbers) when a specific packet is received (e.g. a packet with destination TCP port 6666) and then forward ...
0
votes
2answers
38 views

ctmconv, zenity and filenames with spaces

I'm making a little conversion script in Zenity, but have noticed that ctmconv won't allow spaces in a filename. Can I get rid of spaces in the input filename? #!/bin/bash cd ~/Desktop file="$(zenity ...
-1
votes
1answer
51 views

Joining streams

You normally can pipeline the operations a | b | c where b takes input from a and sends it to c. It has only one input, generated by a. But what if I want to replace a header in file b. I therefore ...
0
votes
2answers
30 views

Are log files written to when a buffer fills or in 'realtime'?

I have a script running which pipes its output through another script; that wrapper script adds a timestamp to each line of the log. However the data is being written to the log file in chunks of ...
0
votes
2answers
35 views

I can not access to normal terminal [duplicate]

I modified my bashrc via terminal and now when I open a terminal I can not do nothing either via Ctrl+Alt+F1, Can anyone help me to fix this. In both cases appears this: # ~/.bashrc: executed by ...
0
votes
1answer
45 views

I messed up the ~/.bashrc file and now terminal doesn't open ubuntu 16.04 [duplicate]

I just installed Android Studio on my ubuntu 16.04 machine and as I didn't want to go to its own home directory and now every single time I try to open the terminal, it tries to start android studio (...
0
votes
0answers
15 views

Sudo /bin/bash -c 'some command' does not load /etc/environment content, not set the env [duplicate]

I've got a bit confused When I do log in via sudo su - I get full environment loaded $ sudo su - # env SHELL=/bin/bash TERM=screen-256color LC_ALL=en_US.UTF-8 HTTPS_PROXY_HOST=myproxy.com ...
-1
votes
1answer
33 views

Rename file under sub-directory in bash [duplicate]

I would like to know how to change the name of a txt file inside a directory. I know that I can mv test123 test456, but that only changes the name in the current directory. What if I want to change ...
1
vote
1answer
33 views

APK versionName grep

Im trying to retrieve the VersionName of a bunch of apk files i have in different folders and store them in an array , but its not working ... I've tried pretty much everything but it only loops 1 ...
0
votes
0answers
46 views

Extract data from logfile from only the previous 24 hours, with bash in a shell script

Using the Ubuntu 14.04 trusty and transmission log for the log file. What is the best way to extract the last 24 hours of log entry's? I have attempted using sed awk grep I cannot seem to get the ...
2
votes
2answers
60 views

STDOUT and STDERR redirection for nc

I am trying to make a watchdog bash script which has to check if the port is open, based on the exit status, otherwise should start the daemon. Problem is I can't manage to avoid the script outputting ...
4
votes
0answers
53 views

How to set a new home directory at every login?

I'm in the process of building a kiosk system and need to give the guest user a new temporary home directory at every login. I wrote a little bash script that takes care of that but when it tries to ...
1
vote
0answers
44 views

Log in to ssh slow for one user, but not another

I'm running a server at home with Ubuntu 14.04. I have two users on the machine, say user1 and user2, each able to ssh into the box. While user1 logs in very quickly, user2 takes about 20 seconds to ...
3
votes
0answers
44 views

Script on reboot

So, I programmed a simple script to alert on slack whenever the server is rebooted. What I did: In /etc/rc6.d/R99reboot-slack: (I tried with R01reboot-slack) #!/bin/sh /scr/msg.sh "Server restarting.....
-1
votes
1answer
21 views

i kann open my pc dual boot win 8.1 ubuntu 16.04 [closed]

After I deleted a partition and rebooted, the screen displayed: GNU GRUB version 2.02-beta2-32ubuntu3 Minimal BASH-like line editing is supported for the first word, TABlist possible ...
1
vote
0answers
28 views

Syntax for sending notification hint using gdbus or python's dbus module

I'm trying to update a previous notification (which displays the screen's brightness after being changed using a progress bar) with gdbus, as notify-send does not support updating. Previously I use ...
4
votes
1answer
79 views

Terminal Closes Immediately on Open 14.04

I tried to follow other answers on here that I found but I cannot stop my terminal from closing as soon as it opens on Ubuntu 14.04 LTS. Here are my profile files. .bashrc .profile /etc/bash.bashrc /...
5
votes
3answers
97 views

Update brightness level depending on the power source on 16.04 LTS

I recently migrated to 64 Bit 16.04 LTS from 32 Bit 14.04 LTS on my Toshiba L645 laptop. In 14.04 LTS system, I had a script that automatically updated the brightness level depending on the power ...
0
votes
1answer
34 views

Run my bash script on login and SEE terminal [duplicate]

i need your help :) I have some script that start on login (I set it on Application launcher preference) but i can't see terminal. One script it's easy and make light on on my CMstorm keyboard and set ...
0
votes
0answers
18 views

Creating A Drag and Drop Bash Script for wipe

I have been using the command like program 'wipe' for ages with a set of options. When I want to delete some files securely I use this command in terminal wipe -fciqr And I drag and drop the files ...
1
vote
3answers
57 views

String Manipulation

var="<string> 1.11 </string>" I want to get rid of <string> and </string> How can I do it? For now i got this: var=${var:9:4} 1.11
0
votes
0answers
20 views

How to change python+filename.py auto-complete to anyfilename

This questions may seems silly as I am a new Linux user on Ubuntu 16.04. I am learning python now. As the command python x+tab will only auto-complete xxxxx.py instead of xxxxx without .py. How ...
-1
votes
1answer
49 views

Store file list of current directory to a file [duplicate]

How can I get a list of all files in the current directory and store that to a file named mycurrent using the command-line?
1
vote
0answers
10 views

Slideshow of Image Folder whose files increase

I am trying to stream video from my webcam to a series of images, process these images through a bash script that uses convert (imagemagick) and then output them to a folder. I have been successful ...
1
vote
2answers
53 views

Cron Job doesn't execute

I created a cron job as root with the command: crontab -e Then I added 0 4 24-31 * 4 /home/backupscript.sh after the last line. The output of crontab -e looks like this: # Edit this file to ...
2
votes
1answer
37 views

How to write efficient script to have memory (RAM) peak?

I have a network with some PCs. I wanted to have peak of the memory for each system. I wrote a script to check the used memory and writes the peak in a file in /tmp; and I've set the script to run ...
1
vote
1answer
48 views

Creating a bash script [closed]

Alright so, just for a little heads up, I literally just learned what bash script was today. Anyways, I have this series of voice recognition programs wrote in python, and I wanted to make a voice ...
0
votes
1answer
20 views

Problems understanding how set works

Can someone please help me understand the following code segment? set -- ${BACKUPDIR}/backup-???.tgz lastname=${!#} backupnr=${lastname##*backup-} backupnr=${backupnr%%.*} backupnr=${backupnr//\?/0} ...
4
votes
1answer
32 views

Extract multiple 7z files with auto rename

I have a bunch of 7z files, some of which contain files that have the same name. Therefore, I would like to do auto rename. I can do something like find ./all -exec 7z x -pabc123 -oall/xml {} \; ...
0
votes
1answer
34 views

help understanding sudo -s [duplicate]

I was trying out a command yesterday that put my computer into hibernation mode. The first line in the command sequence was sudo -s which made my command line go from userName@computerName:~$ to ...
9
votes
2answers
514 views

bash -c “v=value; echo $v” displays nothing

Executing the following from a comand line screen: bash -c "v=value; echo $v" displays nothing. It's ok? How can I assign a value to a variable inside this kind of execution?
1
vote
1answer
34 views

Problem when I changed Fish to default shell

So I tried to make Fish my default shell with the command: sudo chsh -s /usr/bin/fish 'myUsername' Now I get this every time that I launch my terminal: Unable to open universal variable file '/...
1
vote
1answer
36 views

How to change the default shell of at command

when I want to delay the execution of a program using at, it precise me that warning: commands will be executed using /bin/sh How the change this default shell, to bash for instance ?
0
votes
0answers
36 views

Command “sudo su” is not working [duplicate]

By mistake my bashrc has changed (using source command to a .com file). Now sudo su command is not working. To use root I have to give bash command. How can I return previous stage? Or use sudo su?
0
votes
1answer
86 views

-bash: export: not a valid identifier

Whenever opening the terminal, I always end up with this same error. -bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/...
0
votes
1answer
16 views

having trouble installing canopy 1.7.2 on my ubutu 12.04 amd64 computer

I am having trouble installing the canopy installer 1.7.2 on my Ubuntu 12.04 amd64 computer. I have downloaded the software in the "downloads" folder but I get the following error: $ bash canopy-1.7....