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

learn more… | top users | synonyms (1)

1
vote
2answers
131 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
46 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
36 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
135 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 ...
-1
votes
2answers
64 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
23 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
113 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
81 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 ...
3
votes
1answer
91 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
28 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: ...
4
votes
2answers
490 views

Why isn't this script to delete part of my command history working on my computer?

The script can be found here: http://stackoverflow.com/questions/14750650/how-to-delete-history-of-last-10-commands-in-shell For convenience here it is: for x in `seq $1 $2` do history -d $1 done ...
2
votes
1answer
115 views

QEMU Connect physical disk [closed]

I made a windows virtual machine on my ubuntu pc using the following script (found online). #!/bin/bash configfile=/etc/vfio-pci1.cfg vfiobind() { dev="$1" vendor=$(cat ...
11
votes
2answers
423 views

Re-run an application script when it crashes?

I have some applications that need to run on my laptop all the time. I use a bash script to start these applications. In my script I have a loop that looks similar to this: while true; do ...
1
vote
1answer
30 views

Locate the id of input device and change the value of its property

I learned from this post that you can set mouse speed by the following: $ xinput --set-prop 10 "Device Accel Constant Deceleration" 4 where 10 is the id of the target device, which you can obtain ...
0
votes
2answers
21 views

/usr/bin/ or ~/bin/ priority

Here's a hypothetical situation....There are two binaries with the same name. Lets call them charles. One charles is in the /usr/bin/ directory and the other charles is in ~/bin/. Assuming that ~/bin/ ...
0
votes
2answers
45 views

Best way to schedule script, crontab or other options?

I never use crontab, and while it ask me for root password, I am careful. So my question is, I have to run periodically (let's say every 30 min)a simple script for analyze the text file, which is ...
0
votes
1answer
74 views

Is it possible to use variable in sed command in unix bash script [duplicate]

I trying to solve following problem. With great helps of others here, I can write and understand simple do loop in bash scripting. Now I try to do this: In "mein_directory" directory I need ...
2
votes
1answer
199 views

Alternatives for [variable = string substitution] in bash

I am learning bash and trying to understand the different ways of making a substitution and assigning it to a variable. Specifically, I'm changing Unix slashes ('/') to Windows ('\'). References: ...
0
votes
1answer
49 views

What does 'history | grep cp -r ' do?

I typed this commands by mistake in my shell and then my shell was filled with all the text . I don't know what it does .Please someone explain it to me .
2
votes
1answer
70 views

Ubuntu / Bash recognising “export PATH=$PATH:~/…” but not “export PATH=$PATH:/home/…”

So I've been using ubuntu since 09.04 but have limited experience with sys admin. I now want to get into web development and as part of installing the Play Framework, I had to add the activator path ...
0
votes
1answer
56 views

Unable to add repository key to local keychain

I want to install Docker application on my Ubuntu, but i can't execute a command to add Docker repository key to my local keychain. Here's this command: sudo apt-key adv --keyserver ...
2
votes
1answer
169 views

Bash Tab Completion: '-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file

I'm trying to go into an irb session with specific environment variables from a file with this command: $ env $(cat env.sh) irb But when I try press Tab after I type env. to complete it, I get this ...
0
votes
0answers
55 views

How to get paths for default theme icons folders?

I have a desktop file, for Icon i set it to myIconName. Now I have multiple sized PNGs for my icon. I need to find the paths to the default theme icon folders, cross-OS-Linux solution, so I can drop ...
0
votes
1answer
28 views

Unable to append quote sign in terminal out put for offset sequence

I have following offset addresses saved inside a file placed at desktop. eagle@max-pc:~$cat ~/Desktop/offset.txt 0x00000000 0x00000419 0x0000073d 0x00000a24 0x000011cf 0x0000139c ... Now I want to ...
1
vote
2answers
71 views

how to fix my keyboard after a bash script messed it up

Okay, I was stupid. I ran a bash script I got off of some forum on the internet, github I think it was, that said a cool matrix would appear in the terminal, which did happen, but it also messed up my ...
0
votes
1answer
60 views

Used sudo command that I don't understand, want to undo it

I recently installed Ubuntu 14.04 for the first time, and I've been wrestling with various aspects of it since (mostly successfully), however in attempting to fix and issue with Firefox not playing ...
-2
votes
1answer
34 views

How does this lowercase expression works in bash

I want to convert a vaiable value to lower case. To do this, I am doing following lower_case_var=echo ${var,,} Above expression works fine. However, I am wondering that how it works?
1
vote
0answers
40 views

Errors in update checking script (cause: repositories not available)

I have a scripts that tests if updates on my 14.04 server are available, and send me a text message if that happens. The bash script begins with: IFS=';' read updates security_updates < ...
0
votes
1answer
40 views

Writing a bash script to run a server

This is how I launch the server in the terminal: ~$ cd meteor/writer10 && meteor I have to do that every time I start Ubuntu so I thought it would be nice to write a bash script so automate ...
0
votes
2answers
61 views

Deleting first letter of each line

I have a file and I need to delete its first letter of each lines. I tried this: for i in do if [ $5 -eq cat harfler | grep `head -n i harfler | head -c 1` ] then echo "succeded" tr -d `head -n i` fi ...
0
votes
1answer
67 views

How to create a script to sync notes to files using Geeknote

The problem I want to create a directory with my notes from Evernote in files with the Markdown format. I found out that this can be made using Geeknote, but for each notebook every time. How to ...
0
votes
0answers
65 views

Issue with Bash during Zookeeper Installation [duplicate]

I'm new to this stuff. I get an error during installing ZooKeeper. $ echo 1 > /var/lib/zookeeper/myid bash: /var/lib/zookeeper/myid: Permission denied $ nano ~/.bashrc export ...
1
vote
0answers
14 views

Packaging bash file .deb [duplicate]

How can a (with very simple instruction) make a .deb file continent some .desktop files and shell bash files
2
votes
0answers
35 views

When should (( )) be preferred over [ ] for specifying conditions? [closed]

In bash shell scripting, when should we prefer (( )) over test command for specifying conditions? Moreover, what is the difference between the two?
0
votes
2answers
65 views

Stuck in a loop after login in 14.04

I am a Linux beginner so bear with me please. I used a bash script to automatically re-connect to OpenVPN. It worked fine when I ran it. ...
0
votes
2answers
39 views

Send a twiter message from the terminal

Is there away to send a message form the terminal or write a shell bash file that fill send a message to twiter.
2
votes
1answer
82 views

Auto-complete in Ubutnu 14.04 terminal

How can I replace TAB with CTRL+SPACE for auto-complete in Ubuntu terminal?
2
votes
4answers
569 views

Why is this Bash script not working?

I wrote a small Bash script so that the image in the folder becomes the wallpaper: for f in *.jpg do gsettings set org.gnome.desktop.background picture-uri file:$f The error is: ./wall.sh: ...
2
votes
1answer
168 views

Not able to create user on Ubuntu 14.04 (32 bit)

I'm sorry this post is so long, but I wanted to make sure that all the stuff that might be relevant was readily available. I've been trying to create a new user account on my laptop, and, even though ...
1
vote
1answer
47 views

How to use source command for exporting path?

I am trying to set the path of few libraries using source command but its not working and says dsbisht@dsbisht-ThinkCentre-E73:~/Workstation$ source .list bash: .list: No such file or directory My ...
11
votes
1answer
556 views

How can I find the command history if a user used a space before the command?

Do we have any way to find out the command history if the user uses space before any command in the bash, because if user uses space before any command it won't show in history?
1
vote
2answers
24 views

Can't add the exec option to my data partition in Ubuntu 14.04

I'm using an HDD as a external drive, it has 3 partitions and one of them is for my Ubuntu Documents. I'm trying to compile my programs and it gives me the msg: bash: ./qt-opencv-multithreaded: ...
4
votes
4answers
184 views

Command to create sequentially numbered targeted directories and batch move files

I'm creating a timelapse video by splitting a video into individual images, using G'MIC via the command line to average every 7 frames, then output the results to new images which will result in the ...
2
votes
1answer
176 views

Why isn't .profile sourced when opening a terminal?

Just installed Ubuntu 14.04.1 LTS. According to .profile, # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash, if ~/.bash_profile or ~/.bash_login ...
2
votes
1answer
191 views

14.10 gnome classic metacity unable to hook up keyboard shortcut to binary

I am trying to get the Aero Snap effect working on an Ubuntu 14.10 using Gnome Classic Metacity. I found a command that works if I execute in on a terminal window: wmctrl -r :ACTIVE: -b ...
0
votes
2answers
46 views

Bash: Regular Expressions in substitution

I have a bash script to substitute number values inside a text pattern. Suppose I have a file like this: word5word word55word And I want it to look like this: word125word word125word I have this ...
1
vote
4answers
168 views

Create bash file to open minecraft launcher

I use this command in the terminal to run the minecraft launcher with java 8: /home/max/Java/jre1.8.0_25/bin/java -jar Minecraft.jar I included the full java path because I installed it on /home as ...
3
votes
1answer
30 views

Export PATH and EMSCRIPTEN

I am confused about PATH setup. I was installing emscripten and following their tutorial. As the last step you export variables running source ./emsdk_env.sh This exports couple of things: ...
0
votes
1answer
44 views

Is it possible to track the terminal command of a user

We want to monitor the user typing command using terminal . Where the command is saving (.bash-history) is only showing few of the command. Is it possible to get the command executed from the ...
1
vote
1answer
24 views

Glob behavior differences between script and command line

Note the distinct behavior of the following between the shell and a function defined in the shell: First: try directly on the shell: 0:23:34/shared $ls -dlrta ?pectral* -rw-r-----@ 1 steve staff ...