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

learn more… | top users | synonyms (1)

1
vote
1answer
42 views

What does this terminal message mean?

I can't get internet on one of my computers. It says connected. I had this similar problem on my other computer and I used this command to fix it: ip route add default via defaultgatewayip It ...
1
vote
1answer
30 views

Why `wc -m` counts 1 character more?

Why wc -m counts one character (symbol) more from here-string (<<<) Here is example: $ TEST_STR="askubuntu" $ echo "$TEST_STR" askubuntu $ wc -m <<<"$TEST_STR" 10 The same ...
0
votes
0answers
3 views

Can't run chromedriver

I have 64-bit, ubuntu 14.04.03. I have installed linux brew as suggested form here. And I run brew install chromedriver as I need chromedriver for Selenium::WebDriver. I can see the executable file ...
0
votes
0answers
15 views

How can I link a command with a word for the commandline?

how can I start an exe program (wine /path/to/file.exe) with bash with only a single command, e.g. statistic? For example, I can start Firefox with firefox in the commandline. How can I achieve this ...
1
vote
1answer
13 views

udev rules targeting every USB device

I'm trying to execute a script whenever a USB is plugged. What I currently have is a demo script in /usr/local/test.sh: #!/bin/bash touch /home/kfir/test.txt I also have a rules file which tries ...
0
votes
1answer
86 views

bash autocomplete behaving strangely after update

Since bash was updated very recently, when I try to autocomplete by tabbing during a cd I get the following... tony@tony-HP:~$ cd Mucword=1 words[0]=${!ref}${COMP_WORDS[i]} ...
0
votes
1answer
6k views

when building u-boot /bin/bash: arm-none-linux-gnueabi-gcc: command not found

I am currently running Ubuntu 12.0.4 on a 64 bit machine. I have an AM335X development board. Along with the kit came the compressed kernel (linux 3,2), rootfs, u-boot, and ARM cross compiler ...
0
votes
0answers
16 views

OpenVPN connect message in script

I was wondering, how do I run a command when my OPENVPN bash script has connected successfully to a network? I know about the: "command;nextcommand" thing do I do something like this so it runs a new ...
3
votes
1answer
34 views

Finding, moving and removing in Ubuntu

OS: Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-62-generic x86_64) I have a directory like the following: ~/total/ test1/ test1.txt some_other_file_i_dont_care.py test2/ ...
2
votes
1answer
47 views

Trying to Get Total CPU Usage in Bash

I'm trying to get the CPU's total load with this: IDLE=$(mpstat | grep "all" | cut -c 92-) CPULD=$(expr 100 - $IDLE) echo $CPULD but it always returns: expr: non-integer argument on the second ...
3
votes
2answers
65 views

How to split the lines in a text file into two consecutive lines in a new file?

I have a find -exec grep command pair that groups path/filename.ext:ln#:line contents on a single line. I want to divide the line into two consecutive lines in a second file. The consecutive lines ...
0
votes
0answers
12 views

Bash Script for Dumping the Android Partition is not consistent

I really need your suggestion about my current problem. I am trying to dump the whole partitions on the Android with netcat. I have created 4 bash scripts for automation process. So, I only need to ...
0
votes
1answer
12 views

Need run scripts as different users on same host to different hosts without password prompt

I need to run scripts with different linux users on same host to different hosts without password prompt. In other words, the deferent users are on a source host able to login (ssh/scp/other shell ...
-1
votes
1answer
24 views

View the live log in linux

I want to See the Live log from the Log file which is being used within the Script. i have script which makes VPN connection to CISCO VPN Server and then COpy the files to the Remote Location. for ...
15
votes
5answers
18k views

difference between bash.bashrc and /etc/environment file

Till date I used to set my environment variables in the bash.bashrc file. Recently I was told to use the /etc/environment file. Well, both work fine. So, what is the difference between them? I ...
2
votes
4answers
4k views

Minecraft server (Bukkit) .sh bash file not opening

My Minecraft server (Bukkit) .sh bash file is not opening! I did make it executable (in permissions, I clicked "anyone" for executable). Here's the code: #!/bin/bash cd "$( dirname "$0" )" java ...
0
votes
1answer
31 views

Help with a messed up /etc/profile file?

I altered my /etc/profile and now its showing off some errors whenever i startup my system saying that there's some end of file or something like that missing and the session wont be configured ...
3
votes
1answer
27 views

how to make a BASH script to find all php.ini files in dir tree and append text to them

My hosting company advertises a php max upload size that can go up to 60M but, It defaults to 2M and I am not able to make changes to the htaccess file. I can override the default by changing the ...
1
vote
3answers
180 views

Remove Leading or Trailing Space(s) in File or Folder Names

I worked out a neat way ro get rid of duplicate files. You know, the ones that contain "(1).", "(2).", "(3).", etc. in their names. In a terminal window, at the command line, you type in "rm ...
2
votes
1answer
18 views

udev script doesn't run in the background

I'm having trouble getting a script run by udev to run in the background on usb insert. My udev rule seems to work, since it definitely calls the script, but no matter what I do, I can't get bash ...
0
votes
2answers
40 views

How to backup and reinsert .bashrc-like files with post-install script?

I have my proudly written .bashrc and .bash-aliases files. Sometimes, I edit them. More often, I reinstall the whole system. What is the best and simplest way to preserve content of files (for ...
33
votes
5answers
13k views

How to avoid duplicate entries in .bash_history

The same command is listed in my history again and again. How can I avoid this? I know it's possible via HISTCONTROL but I haven't found the right way.
0
votes
1answer
45 views

Typing the command too long eats up the prompt when using the promptline theme

I am using the edkolev/promptline.vim theme(just installed it) for customizing the bash prompt. The biggest problem is that whenever I type long comments it replaces the prompt instead of continuing ...
12
votes
2answers
720 views

Is there an easy way to log all activity that a shell script does?

Is there an easy way to log all activity that occurs from a shell script to a file? I have a script. It outputs things like echo "instructions", as well as other program output. I know the commands: ...
1
vote
0answers
24 views

Simple way to delete a file and all its links (simultaneously)

I found a lot of questions on how to delete symlinks only, or delete symlinks based on their contents, but no one has asked how to do what I want to do. Take the following example file-l -> ...
12
votes
2answers
1k views

How do I remove the “did you mean…” feature in the shell?

When I fail to type correctly a command, for example: luca@mostro:~$ sido No command 'sido' found, did you mean: Command 'sudo' from package 'sudo' (main) Command 'sudo' from package 'sudo-ldap' ...
0
votes
0answers
18 views

.bash_history of root account on Ubuntu Server 14.04

Last few hours I'm looking for a solution to enable saving of bash history on root account of Ubuntu Server 14.04. I'm not using root account, because I created my own, but some other users are still ...
1
vote
2answers
40 views

Run html2text on all files in a directory that do not have an extention

I have a directory filled with many files with no extensions that were put there by a call to wget. I want to use html2text to convert all these files to plain text files. In other words, how to ...
0
votes
1answer
16 views

Setting action with xbindkeys: sh: 1: Bad substitution and wrong clipboard area

I'm trying to copy the song info (artist - title) to the clipboard in xbindkeys using shell command and the banshee --query-title and --query-artist commands. first I open the xbindkeys with $ ...
6
votes
3answers
166 views

Getting internet browsing history from shell

is it possible to use the shell or generate a shell script to find out the browsing history from the browsers installed on the system? thank you
1
vote
1answer
141 views

How to run streamus app from terminal

I use Streamus to stream music from you tube. I want to know whether streamus can be started from terminal itself. I have asked this question in main software site and the author recommended to use ...
0
votes
1answer
31 views

Configuration for green tty's foreground and boot text after grub menu

I have set up my system (Ubuntu 14.10) for a text boot up. I need to configure my ttys and boot in such a way that it shows green font for boot messages and ttys.Right now, after the grub menu(which ...
32
votes
2answers
346k views

How to copy files via terminal?

I have read about copying files with terminal but these examples will help me a lot. So here is what I want to do: Examples: I have a file in /home/levan/kdenlive untitelds.mpg and I want to copy ...
0
votes
0answers
33 views

awk add certain colum if two columns are similar

First at all I apologize, but I am a newbie in scripting, and I try to learn something. I have a file which looks like this: 1 A 84.54 47355 1281 1 A 80.16 47355 761 1 A 81.63 ...
0
votes
1answer
23 views

keep track of multiple terminals from shell script

I am writing a quick start shell script to automatically set up my development environment for a current project. However, none of the commands in the shell script can be executed after my server ...
-2
votes
1answer
26 views

Bash regular expression

I need to write a regular expression in bash to find the words with 5 characters where the last character is 'c' and the words contain a '.' (dot). And also to write a unix command to get a list of ...
1
vote
3answers
70 views

How can I get rid off fork bomb?

I tried the fork bomb code : :(){:|:&};: and closed the PuTTy. Now it is not accepting the new connections(Denial of Service attack). How can I recover from that ?
0
votes
1answer
24 views

exit shell script when a process check is failed

i need to exit from shell script when TESTEXCHANGE process is not running on a host.How can i handle this: I have a script processcheck which checks if the process is running. I call that to the ...
-1
votes
0answers
25 views

Start bash script from another script

I have two scripts /etc/init.d/script_1 and /opt/script_2. I need to call script_2 from script_1. In script_1 i write: /opt/script_2 And it works. But there is small option with script_2 - it must ...
0
votes
1answer
40 views

Bash Script for Running Command in Root in ADB Shell

I am trying to dump the partitions of Android devices with netcat. I have created 3 bash scripts for supporting the process. I have trouble on the second which to dumpt the specific partition ...
0
votes
1answer
38 views

read file names from files for command line

I want to run a program requiring comma-separated arrays of files as follows: program -input1 A.txt,B.txt,C.txt -input2 D.txt,E.txt,F.txt -out out.txt My bash attempt: I'm running command from a ...
0
votes
0answers
20 views

Blueman terminal commands

I'm having trouble with blueman conflicting with my wifi drivers and want to create a bash script that turns blueman off, restarts network-manager and then turns blueman on. The problem I'm running ...
0
votes
2answers
468 views

How can I get Subliminal to work and then integrate it with a file manager?

I have downloaded Subliminal which is a program that downloads movie subtitles.But there are several problems: (1) when I test it at the console with a movie that I know has an English subtitle, I ...
1
vote
2answers
24 views

Copying exact amount of files via scp

I'm copying pictures form my iphone via scp, where filenames looks like this IMG_3134.JPG. And let's say I'd like to copy files from IMG_3094.JPG to IMG_3134.JPG. Using special characters like * or ? ...
1
vote
1answer
32 views

bash alias with parameters [duplicate]

I would like to swap from csh to bash, then I have to set the .bashrc with the commands I use. Translating alias with parameters seems to be not easier as I believed. csh: alias gr 'xmgrace -legend ...
42
votes
14answers
128k views

How can I create a select menu in a shell script?

I'm creating a simple bash script and I want to create a select menu in it, like this: ./script echo "Choose your option:" 1) Option 1 2) Option 2 3) Option 3 4) Quit And according to ...
13
votes
6answers
35k views

How to round decimals using bc in bash?

A quick example of what I want using bash scripting: #!/bin/bash echo "Insert the price you want to calculate:" read float echo "This is the price without taxes:" echo "scale=2; $float/1.18" |bc -l ...
0
votes
1answer
25 views

Ubuntu 14.04 VPS - How to keep process running in background and periodically make sure that it is still running

I have an Ubuntu 14.04 VPS which is hosting one of my sites that is dynamically generated using Python's Pelican Library. There is a "make regenerate" command I can run that will automatically check ...
12
votes
3answers
3k 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 ...
14
votes
4answers
4k views

How do I redirect command output to vim in bash?

I am trying to redirect the output of a bash command into a new file. If I try the pipe as below : ls -la | vim Bash shows me the errors : Vim: Error reading input, exiting... Vim: preserving ...