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

learn more… | top users | synonyms (1)

5
votes
1answer
245 views

How can you mirror an autocomplete function in your own aliases (in 14.04)

I have a bunch of aliases that I've used on my 12.04 machine. example: alias pssh="tsocks ssh" alias pscp="tsocks scp" alias prdp="tsocks xfreerdp ..........SOMETHING ...." These aliases are ...
1
vote
1answer
19 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
vote
3answers
272 views

How to install RevKit

I’m trying to install a software called RevKit on Ubuntu 12.10 and the following instructions1 need to be followed: RevKit can be downloaded from the www.revkit.org website. Opening a Bash ...
9
votes
9answers
2k views

change directory (cd) but by replacing a part of the path only

Not sure if it is possible, but i seem to remember from my old days using AIX it was possible to change my path by just saying which part of the path needed to be replaced by something else. For ...
-1
votes
1answer
11 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
44 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 ...
1
vote
1answer
49 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
2answers
30 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.
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 ...
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 ...
-1
votes
1answer
25 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 ...
-1
votes
0answers
53 views

The program 'sed' is currently not installed. You can install it by typing

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 ...
0
votes
1answer
19 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
25 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
2answers
22 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
17 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
0answers
23 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
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
2answers
55 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
0answers
21 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
20 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 ...
1
vote
1answer
18 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
36 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
23 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 ...
1
vote
3answers
42 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
0answers
14 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 ...
14
votes
4answers
29k views

How do I clean or disable the memory cache?

After the system starts, in a few minutes my memory cache fills up and it starts using the swap. Here's a screenshot of /proc/meminfo. However, if I can disable this process / clean the cache once ...
-1
votes
0answers
19 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
19 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 ...
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 ...
4
votes
3answers
6k views

Changing behavior of bash prompt when functioning as root

Before you click away, this isn't the typical "how do I make my bash prompt have color" question. I've already customized my bash prompt to look like this: [user @ host]----[$(pwd)] $ where ...
17
votes
6answers
15k views

How to start a terminal with certain text already input on the command-line?

Rather than rephrasing my question, let me describe to you the desired user-case: I create a short shell-script to run command "gnome-terminal --someoptionflagname 'my text to be posted'", and ...
1
vote
1answer
39 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 ...
2
votes
1answer
55 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
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
32 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 ...
0
votes
1answer
115 views

Prevent *buntu from updating dictionaries during install

In utilizing Vagrant to install an Ubuntu server box with a GUI (lxde), the shell provisioning fails due to what seems to be a frequent issue when setting up dictionaries. The resolutions seem to all ...
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 ...
66
votes
7answers
119k views

How do I create a permanent Bash alias?

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a ...
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 ...
7
votes
2answers
556 views

How to do: underline, bold, italic, strikethrough, color, background, and size in Gnome Terminal?

How to do: underline, bold, italic, strikethrough, and color in Gnome Terminal? Bold Italic u̲n̲d̲e̲r̲l̲i̲n̲e̲ s̶t̶r̶i̶k̶e̶ ̶i̶t̶ ̶l̶i̶k̶̶e̶ ̶i̶t̶s̶ ̶h̶o̶t Color background font < (its mono ...
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
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
12 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
30 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 ...
3
votes
3answers
183 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 ...
1
vote
3answers
21k views

./configure no such file or directory even after installing build essentials

I'm trying to install Java SE 7 on my ubuntu 13.04. I have already downloaded tar.gz file and extracted. But when I wrote in terminal: ./configure I saw this message bash: ./configure: No such ...