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

learn more… | top users | synonyms (1)

0
votes
0answers
13 views

Automatically run a command after unlocking screen/wake up? [duplicate]

Is there an easy way to make Ubuntu run a specified command each time I unlock the screen (after an overlay with password prompt dissapears)?
0
votes
3answers
948 views

Run script full screen in terminal

How do I get a bash script to run in full screen when it's executed or how can I change the terminal size if I can't make it full screen?
2
votes
0answers
47 views

Script Issue (Incrementation) [closed]

I'm writing a script in bash. My output down below is wrong. The test data I'm pulling from makes it so that all connections allowed and denied should be in time "00" yet for every day I crawl through ...
0
votes
1answer
54 views

How do I enable automatic history expansion for commands using 'magic space'?

I read on a blog somewhere about the possibility to use automatic history expansion before actually executing a command or even pressing the enter key in the command line. It involves the ...
0
votes
3answers
428 views

Permission denied error while creating file by using script file

I have created a script file called black_list.sh. #!/bin/bash default_card=`head -1 /proc/asound/modules` echo $default_card if [ ! -e /etc/modprobe.d/sound.blacklist.conf ] && [[ ...
1
vote
1answer
148 views

text is not appearing at cursor in bash, can I reset it somehow?

This happens sometimes if the VM bumps up against upper limits of memory and has to hit swap heavily for extended periods (a few minutes or more). When this happens and I type asdf at the prompt it ...
3
votes
2answers
236 views

Why does a bash-zenity script has that title on Unity Panel and that icon on Unity Launcher?

I have this small bash script which helps use Infinality font rendering options via a more user-friendly Zenity window: http://gnomefiles.org/content/show.php/Infinality+Style+Changer?content=161984 ...
0
votes
1answer
1k views

Cannot execute binary file

I am new to Ubuntu and I'm trying to install Popcorn Time. I downloaded 32 bit version and tried to install it but that's where the problem started showing. I double clicked the executable file and ...
1
vote
3answers
115 views

Help creating a messagebox notification with yes/no options before an application runs

I started using Ubuntu alongside Windows about 2 months ago. I've slowly been adding all of the programs that I use regularly to Ubuntu, so that I will eventually be able to do everything in Ubuntu ...
0
votes
1answer
892 views

FFMpeg permission denied error

I installed ffmpeg into /root/bin I followed this guide: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu I now want a non admin to access it. I created a symbolic link in /usr/local/bin now if ...
1
vote
2answers
1k views

Namenode formatting in hadoop installation

I have given the path for both the configuration files directory and the .sh files directory. I managed to do the configurations with this path: ...
0
votes
2answers
325 views

Is it safe to alias rm to safe-rm?

We are happy to use safe-rm as a replacement to rm, but is it considered safe to alias it? e.g. alias rm='safe-rm'
0
votes
1answer
103 views

How to create a new user defined command to kill processes using process name?

Suppose I wanted to kill firefox , I just write pidof fi(press tab)refox (appears on its own) , then I write ' kill 'id given by pidof' ' on terminal. I know that I can write 'kill `pidof firefox` ' ...
1
vote
1answer
333 views

bash script move file to folders based in name

I hope you can help me... I made a perl and bash script to make a backup of my firewalls and tranfers via tftp #!/bin/sh perl /deploy/scripts/backups/10.160.23.1.pl > /dev/null 2>&1 ...
1
vote
1answer
72 views

-ln links to wrong file

I've just installed matlab and want to be able to call it from the terminal. It works fine when I explicitly call it from its directory. I cd to /usr/local/bin and type sudo ln -s ...
3
votes
1answer
367 views

Bash script runs fine, but not in cron

I have a script that's supposed to record a shoutcast stream for an hour, convert it to mp3, and then save it. The script runs correctly when I run it from the terminal, but I can't seem to get it to ...
0
votes
1answer
2k views

alias of nodejs as node on 14.04

i installed nodejs with apt-get on 14.04 When i do nodejs -v v0.10.25 and when i do node -v node : command not found. So i want to make alias of nodejs as node So i inserted a line in ...
0
votes
2answers
150 views

Cron doesn't execute one of the scheduled jobs

I'm using a lubuntu desktop, distribution Ubuntu 13.10, i686. This is my problem: in the job list scheduled by cron a job hasn't effect, but in /var/log/syslog its execution is traced. This is the ...
1
vote
1answer
34 views

Print out the amount of times 2 words appear in the syslog. But also have it tell me how many times for each hour

So I'm trying to create a bash script that looks for two words in my syslog file. Then I want the script to print out how many times those two words have appeared. Also I want it to print it out for ...
1
vote
1answer
170 views

write a bash which open firefox on every ten minute

Is it possible to write an script which do a specific command every ten minute? I do not know if this is a loop? For example Every ten minute delete a file name foo on the home directory? or every ...
1
vote
3answers
1k views

build command by concatenating string in bash

I have a bash script that builds a command-line in a string based on some parameters before executing it in one go. The parts that are concatenated to the command string are supposed to be separated ...
0
votes
1answer
30 views

How to create a script to launch several emulated ROM inside a folder

I would like to create a script to run simultaneously all the N64 Roms that I put inside a folder, reading the names from a text file. Since now I did a script like this: cat ./listN64_full.txt | ...
0
votes
1answer
107 views

What does the 'sudo -s' command do, and how is it used in this example?

I have the following doubt. In a tutorial related to a software installation that I am following say that I have to execute the following commands (I am doing it into an ssh shell, so this list of ...
0
votes
3answers
126 views

alias/function with command line arguments

I'm tired of typing manage.py startserver 10.211.55.4:4000, so decided to make an alias for that. Only thing is: the port sometime changes. So I did this in bash profile: function runserver() { ...
0
votes
2answers
70 views

Something is wrong with my bash prompt?

So when I type with my new bash prompt it goes on for a while, but if the command gets to long it loops around itself and writes over bash prompt. Here is my PS1 : PS1='\e[0;34m\A\e[m | ...
0
votes
1answer
140 views

Help writing server script to ban IP's from a list

I have a VPS that I use as an openvpn and web server. For some reason, my apache log files are filled with thousands of these hack attempts: "POST /xmlrpc.php HTTP/1.0" 404 395 These attack attempts ...
0
votes
4answers
1k views

Creating A Simple Bash Script With Multiple Commands [duplicate]

Trying to create a bash script that opens gnome-terminal, and then runs ls to display the contents of a directory, but it just opens gnome-terminal. I will be creating some other scripts that also use ...
0
votes
2answers
86 views

Redirecting output to std output or /dev/null depending on optional parameter

I have a script where you can run it just like this ./myscript and the output of some commands called inside the script are hidden, just like this: if mvn tomcat:deploy &> /dev/null; then ...
1
vote
1answer
38 views

Changing current directory to directory that have identifier as the substring

My terminal is currently in the home directory, and the home directory contains a directory which have "round" as the substring. Is there any way to directly change to that directory without typing ...
2
votes
1answer
57 views

What do the '?', '.' and '+' symbols mean when I run 'who -aH'?

What does the plus sign (+), question mark (?) and period (.) mean in the idle column when I run who -aH? I tried Google, but the results are all about regular expression and wildcards. EDIT: I ...
5
votes
2answers
350 views

Hiding output of a command

I have a script where it checks whether a package is installed or not and whether the port 8080 is being used by a particular process or not. I am not experienced at all with bash, so I did something ...
1
vote
2answers
321 views

Running shellscript with cronjob is making problems, executing manually not. Ideas?

I made a shell script called /home/root/cron_grads.sh (chmodded 755) on my server. In this directory are more grads-scripts like 500hPa_p0.gs (644). My main script creates a temporary file ...
1
vote
2answers
61 views

how can i find all files that contain embedded crc32's

how can I find all files that contain embedded crc32's e.g. Mydocument190_[F285E17D].pdf using the find command to clarify the crc32's are always within brackets [F285E17D] and the file names may ...
1
vote
1answer
46 views

Install bashmark on ubuntu 12.04

I followed the instructions at this page: http://www.huyng.com/projects/bashmarks/ to install bashmark on ubuntu. I have not understood what the guide mean with "add source ~/.local/bin/bashmarks.sh ...
7
votes
4answers
5k views

How to check the process is already running or not

I want to check the particular process in already running or not. I refereed this Q&A. But I didn't get any specific solution. Following is the example that I tried: I have created abc.sh file ...
1
vote
2answers
202 views

How to create a script which opens the browser and logins to a particular Gmail account?

I have created a bash script login.sh. I want it to open the browser and login to my Gmail account. I tried using the following command to open the browser with www.gmail.com. xdg-open ...
21
votes
3answers
3k views

Why does “A=10 echo $A” not print 10?

This command: A=10 echo $A prints an empty line. Why not 10? Why doesn't the in-place temporary environment setting work? I want to know the reason and explanation rather than solution. I used ...
1
vote
2answers
1k views

bash: config.sh: No such file or directory

Whenever I open my terminal, it displays bash: config.sh: No such file or directory followed by the command prompt in the next line. My .bashrc file contains: source config.sh I mainly use Ubuntu ...
0
votes
1answer
130 views

Bash script not adding variables to session [duplicate]

I have a bash script that I have added as a startup application. It does a bunch of exports and alias assignment. #! /bin/bash alias devhm='cd ${DEV_HOME}; ll'; alias wlhm='cd ${WL_HOME}; ll'; alias ...
16
votes
4answers
2k views

Why does terminal auto complete sometimes not suggest anything for the `services` command?

Sometimes, when I type a command on the terminal, the terminal's autocomplete does not work, even if my command is not wrong. For example, take look to this: sudo service vsftpd status sudo and ...
1
vote
1answer
110 views

How do I read values from CSV into a script? [closed]

I want to write a script that reads a URL from a .csv file, gets the whois data, then goes to the next URL in the list. #!/bin/bash whois $URL &> "$URL.txt" How do I get the $url, and run ...
3
votes
1answer
62 views

Destroy a juju service and also its associated machine

I'm looking for a way to automatically destroy the associated machine after destroying a service with: juju destroy-service [service_name] I know I can do: juju destroy-machine --force ...
0
votes
1answer
45 views

How to set bashrc shell environment

I would like to add _ENV to my bash so once I ssh to the server it shows something like this: [live][root@server ~]# or [dev][root@server ~]# How can I do this? I have been looking everywhere ...
0
votes
1answer
100 views

Permission error trying this backup script

I am trying this Backup Shell Script from the server guide. Granted it's for my desktop running Xubuntu 14.04. The NFS is mounted and accessible. The script has been created and edited with the ...
2
votes
2answers
237 views

How can I compare two directories recursively and check if one of the directories contains the other?

I have two directories, they contain common files. I want to know if one directory contains the same file as the other. I found a script on the net but I want to need improve it to do recursively. ...
1
vote
2answers
470 views

installing rvm in 12.04 ubuntu which is on virtualbox

I have tried a lot of methods but cant get this done. I am trying to install rvm on 12.04 ubuntu. There has been many problems in past like this and I have referred as much as I can and still nothing ...
1
vote
2answers
95 views

What are the standard Environment variables ($) in Ubuntu?

I know some useful environment-variables like $HOME, $UID, $BASH, $LOGNAME etc. which is useful to get information in terminal/command-line with using echo(ex: echo $LOGNAME) I want to know what are ...
5
votes
1answer
975 views

What does echo with “>>” symbol do?

I've seen some command like echo '* - nofile 65535' >> /etc/security/limits.conf I know echo print something on the screen. and limits.conf was a file in that /etc/security path. But want ...
0
votes
0answers
43 views

Execute script as root on global hotkey independent of logged in user?

Desired scenario: Upon system boot, a bash script is loaded which listens for a specific global keypress, independent of logged in user, also listening in the lock screen. Upon a specific keypress, a ...
1
vote
1answer
535 views

How do I write a script to output an html file?

What am I doing wrong in this script? #!/bin/bash cat > /tmp/flash-viewer.htm <<- _EOF_ <HTML><HEAD><TITLE>Flash Viewer</TITLE></HEAD><BODY> <object ...